diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-11-27 20:57:58 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-12-17 14:51:42 +0100 |
commit | da12fe5414f922d896289f037515096f189c66da (patch) | |
tree | 09e8347a8723697fd480bd8d44285481d36f06c1 /fs/btrfs/volumes.c | |
parent | 2ab4fd3135ee21514a50c4f139c4f80c0b43a8ec (diff) | |
download | linux-da12fe5414f922d896289f037515096f189c66da.tar.bz2 |
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>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 2085d4d3a6fe..6c806808b6a1 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -6136,8 +6136,10 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, *length = em->len - offset; } - /* This is for when we're called from btrfs_merge_bio_hook() and all - it cares about is the length */ + /* + * This is for when we're called from btrfs_bio_fits_in_stripe and all + * it cares about is the length + */ if (!bbio_ret) goto out; |