btrfs: set bbio->file_offset in alloc_new_bio
authorChristoph Hellwig <hch@lst.de>
Mon, 12 Dec 2022 07:37:20 +0000 (08:37 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 15 Feb 2023 18:38:55 +0000 (19:38 +0100)
commit0d495430db8d704b3a70b244b54d5ee30cf03f69
tree37fa3a96685aa3e34adcbe9b3ce5b4d753ca14a7
parent72fcf1a47b8daba82ffdeddd630688df5ac1bddb
btrfs: set bbio->file_offset in alloc_new_bio

Instead of digging into the bio_vec in submit_one_bio, set file_offset at
bio allocation time from the provided parameter.  This also ensures that
the file_offset is available all the time when building up the bio
payload.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c