]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: factor out helper adding a page to bio
authorNaohiro Aota <naohiro.aota@wdc.com>
Thu, 4 Feb 2021 10:21:57 +0000 (19:21 +0900)
committerDavid Sterba <dsterba@suse.com>
Tue, 9 Feb 2021 01:46:04 +0000 (02:46 +0100)
commit44ec8d9c7fbf79500601dac86d3ff135aa145a69
treea96a702730a25aadea0f507b24a23a336fb427bb
parent51f8d74ae1ff5c7cf164ce35a9b55031c9aaed66
btrfs: factor out helper adding a page to bio

Factor out adding a page to a bio from submit_extent_page().  The page
is added only when bio_flags are the same, contiguous and the added page
fits in the same stripe as pages in the bio.

Condition checks are reordered to allow early return to avoid possibly
heavy btrfs_bio_fits_in_stripe() calling.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c