]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Refactor btrfs_merge_bio_hook
authorNikolay Borisov <nborisov@suse.com>
Tue, 27 Nov 2018 18:57:58 +0000 (20:57 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Dec 2018 13:51:42 +0000 (14:51 +0100)
commita1b72c80aff62ff1cf5f0fdb658dca7e288e0aea
tree09e8347a8723697fd480bd8d44285481d36f06c1
parentff5b74c24dfd09050ea3e84e58c484be3697ae9e
btrfs: Refactor btrfs_merge_bio_hook

This function really checks whether adding more data to the bio will
straddle a stripe/chunk. So first let's give it a more appropraite name
- btrfs_bio_fits_in_stripe. Secondly, the offset parameter was never
used to just remove it. Thirdly, pages are submitted to either btree or
data inodes so it's guaranteed that tree->ops is set so replace the
check with an ASSERT. Finally, document the parameters of the function.
No functional changes.

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/compression.c
fs/btrfs/ctree.h
fs/btrfs/extent_io.c
fs/btrfs/inode.c
fs/btrfs/volumes.c