btrfs: turn the backref sharedness check cache into a context object
authorFilipe Manana <fdmanana@suse.com>
Tue, 11 Oct 2022 12:17:02 +0000 (13:17 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:39 +0000 (18:00 +0100)
commit61dbb952f0a5f587c983d88853212e969d2d4ede
tree0e28d1d2e8a16d2c72afaedb04c595f475d0e854
parentceb707da9ad92ad3a5251dc13844034ded06cb3d
btrfs: turn the backref sharedness check cache into a context object

Right now we are using a struct btrfs_backref_shared_cache to pass state
across multiple btrfs_is_data_extent_shared() calls. The structure's name
closely follows its current purpose, which is to cache previous checks
for the sharedness of metadata extents. However we will start using the
structure for more things other than caching sharedness checks, so rename
it to struct btrfs_backref_share_check_ctx.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/backref.c
fs/btrfs/backref.h
fs/btrfs/extent_io.c