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)
commit939c7feb19217c752a4b368d35aae1ed98f40b61
tree5257a5132311644ec4e9e62461cc0806b01bb6f7
parent114623979405abf0b143f9c6688b3ff00ee48338
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: 390ed29b817e ("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