]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Refactor btrfs_rmap_block to improve readability
authorNikolay Borisov <nborisov@suse.com>
Tue, 19 Nov 2019 12:05:53 +0000 (14:05 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 23 Jan 2020 16:24:35 +0000 (17:24 +0100)
commit37c3b3efd0f009ca272f21ee526f259ba9145136
tree4c8dcce97a318dc47ed420bd9c491a19fc48c817
parent89504b2433e25e5726545619083068c39b604944
btrfs: Refactor btrfs_rmap_block to improve readability

Move variables to appropriate scope. Remove last BUG_ON in the function
and rework error handling accordingly. Make the duplicate detection code
more straightforward. Use in_range macro. And give variables more
descriptive name by explicitly distinguishing between IO stripe size
(size recorded in the chunk item) and data stripe size (the size of
an actual stripe, constituting a logical chunk/block group).

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c