diff options
author | Christoph Hellwig <hch@lst.de> | 2022-04-04 07:45:18 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-05-16 18:03:12 +0300 |
commit | 58ff51f148ec498758d66c226cb2f7a065b36478 (patch) | |
tree | f6f5fca79c1b748fcc93d38a5ff1a80400e57a12 /fs/btrfs/scrub.c | |
parent | 57906d58e2b5a109d30be8e27c88c2648caea2a9 (diff) | |
download | linux-58ff51f148ec498758d66c226cb2f7a065b36478.tar.xz |
btrfs: check-integrity: split submit_bio from btrfsic checking
Require a separate call to the integrity checking helpers from the
actual bio submission.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r-- | fs/btrfs/scrub.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index d07059a1f747..d78dbe540978 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -1475,7 +1475,8 @@ static void scrub_recheck_block(struct btrfs_fs_info *fs_info, bio->bi_iter.bi_sector = sector->physical >> 9; bio->bi_opf = REQ_OP_READ; - if (btrfsic_submit_bio_wait(bio)) { + btrfsic_check_bio(bio); + if (submit_bio_wait(bio)) { sector->io_error = 1; sblock->no_io_error_seen = 0; } @@ -1559,7 +1560,8 @@ static int scrub_repair_sector_from_good_copy(struct scrub_block *sblock_bad, return -EIO; } - if (btrfsic_submit_bio_wait(bio)) { + btrfsic_check_bio(bio); + if (submit_bio_wait(bio)) { btrfs_dev_stat_inc_and_print(sector_bad->dev, BTRFS_DEV_STAT_WRITE_ERRS); atomic64_inc(&fs_info->dev_replace.num_write_errors); @@ -1715,7 +1717,8 @@ static void scrub_wr_submit(struct scrub_ctx *sctx) * orders the requests before sending them to the driver which * doubled the write performance on spinning disks when measured * with Linux 3.5 */ - btrfsic_submit_bio(sbio->bio); + btrfsic_check_bio(sbio->bio); + submit_bio(sbio->bio); if (btrfs_is_zoned(sctx->fs_info)) sctx->write_pointer = sbio->physical + sbio->sector_count * @@ -2049,7 +2052,8 @@ static void scrub_submit(struct scrub_ctx *sctx) sbio = sctx->bios[sctx->curr]; sctx->curr = -1; scrub_pending_bio_inc(sctx); - btrfsic_submit_bio(sbio->bio); + btrfsic_check_bio(sbio->bio); + submit_bio(sbio->bio); } static int scrub_add_sector_to_rd_bio(struct scrub_ctx *sctx, |