]> Gentwo Git Trees - linux/.git/commit
btrfs: send: index backref cache by node number instead of by sector number
authorFilipe Manana <fdmanana@suse.com>
Mon, 8 Sep 2025 11:19:29 +0000 (12:19 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 23 Sep 2025 06:49:21 +0000 (08:49 +0200)
commit0dc93e465289d3eee30abd4710bac8d9f475311f
tree5628000af315b1d0e65ea8e1bd41dbe7e92fab40
parent2753e49176240f21e4bb10e03514f99e732704bb
btrfs: send: index backref cache by node number instead of by sector number

We now have a nodesize_bits member in fs_info so we can index an extent
buffer in the backref cache by node number instead of by sector number.
While this allows for a denser index space with the possibility of using
less maple tree nodes, in practice it's unlikely to hit such benefits
since we currently limit the maximum number of keys in the cache to 128,
so unless all extent buffers are contiguous we are unlikely to see a
memory usage reduction in the backing maple tree due to fewer nodes.
Nevertheless it doesn't cost anything to index by node number and it's
more logical.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/send.c