We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cab137 commit 74098a9Copy full SHA for 74098a9
fs/btrfs/scrub.c
@@ -2812,7 +2812,17 @@ static noinline_for_stack int scrub_supers(struct scrub_ctx *sctx,
2812
gen = btrfs_get_last_trans_committed(fs_info);
2813
2814
for (i = 0; i < BTRFS_SUPER_MIRROR_MAX; i++) {
2815
- bytenr = btrfs_sb_offset(i);
+ ret = btrfs_sb_log_location(scrub_dev, i, 0, &bytenr);
2816
+ if (ret == -ENOENT)
2817
+ break;
2818
+
2819
+ if (ret) {
2820
+ spin_lock(&sctx->stat_lock);
2821
+ sctx->stat.super_errors++;
2822
+ spin_unlock(&sctx->stat_lock);
2823
+ continue;
2824
+ }
2825
2826
if (bytenr + BTRFS_SUPER_INFO_SIZE >
2827
scrub_dev->commit_total_bytes)
2828
break;
0 commit comments