]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: zoned: fix ordered extent boundary calculation
authorNaohiro Aota <naohiro.aota@wdc.com>
Wed, 11 Aug 2021 06:37:08 +0000 (15:37 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:16 +0000 (13:19 +0200)
commitb2df107d18b89753af44ffcfeb667ede9ba589c5
tree5257a5132311644ec4e9e62461cc0806b01bb6f7
parent8eee14b6c90524e7c8303bd7fab3cb26258dff13
btrfs: zoned: fix ordered extent boundary calculation

btrfs_lookup_ordered_extent() is supposed to query the offset in a file
instead of the logical address. Pass the file offset from
submit_extent_page() to calc_bio_boundaries().

Also, calc_bio_boundaries() relies on the bio's operation flag, so move
the call site after setting it.

Fixes: 83885a095e74 ("btrfs: refactor submit_extent_page() to make bio and its flag tracing easier")
Reviewed-by: Qu Wenruo <wqu@suse.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