Skip to content

Commit 45c2f36

Browse files
Christoph Hellwigkdave
authored andcommitted
btrfs: call btrfs_orig_bbio_end_io in btrfs_end_bio_work
When I implemented the storage layer bio splitting, I was under the assumption that we'll never split metadata bios. But Qu reminded me that this can actually happen with very old file systems with unaligned metadata chunks and RAID0. I still haven't seen such a case in practice, but we better handled this case, especially as it is fairly easily to do not calling the ->end_іo method directly in btrfs_end_io_work, and using the proper btrfs_orig_bbio_end_io helper instead. In addition to the old file system with unaligned metadata chunks case documented in the commit log, the combination of the new scrub code with Johannes pending raid-stripe-tree also triggers this case. We spent some time debugging it and found that this patch solves the problem. Fixes: 103c197 ("btrfs: split the bio submission path into a separate file") CC: [email protected] # 6.3+ Reviewed-by: Johannes Thumshirn <[email protected]> Tested-by: Johannes Thumshirn <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 597441b commit 45c2f36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/bio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static void btrfs_end_bio_work(struct work_struct *work)
330330
if (bbio->inode && !(bbio->bio.bi_opf & REQ_META))
331331
btrfs_check_read_bio(bbio, bbio->bio.bi_private);
332332
else
333-
bbio->end_io(bbio);
333+
btrfs_orig_bbio_end_io(bbio);
334334
}
335335

336336
static void btrfs_simple_end_io(struct bio *bio)

0 commit comments

Comments
 (0)