summaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2020-11-04 11:07:32 +0000
committerDavid Sterba <dsterba@suse.com>2020-12-08 15:54:08 +0100
commit5893dfb98f257805b26e499a2d5d9190f2db7484 (patch)
tree20eeee7f62c3f94ee242982c9245c8698f1f6bb8 /README
parente114c545bb699b2e97e8661d41f34a1651b43f50 (diff)
downloadlinux-5893dfb98f257805b26e499a2d5d9190f2db7484.tar.bz2
btrfs: refactor btrfs_drop_extents() to make it easier to extend
There are many arguments for __btrfs_drop_extents() and its wrapper btrfs_drop_extents(), which makes it hard to add more arguments to it and requires changing every caller. I have added a couple myself back in 2014 commit 1acae57b161e ("Btrfs: faster file extent item replace operations") and therefore know firsthand that it is a bit cumbersome to add additional arguments to these functions. Since I will need to add more arguments in a subsequent bug fix, this change is preparatory work and adds a data structure that holds all the arguments, for both input and output, that are passed to this function, with some comments in the structure's definition mentioning what each field is and how it relates to other fields. Callers of this function need only to zero out the content of the structure and setup only the fields they need. This also removes the need to have both __btrfs_drop_extents() and btrfs_drop_extents(), so now we have a single function named btrfs_drop_extents() that takes a pointer to this new data structure (struct btrfs_drop_extents_args). Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions