From acb79301c3de8b3a5b6b03fc6ac90c87b5b82153 Mon Sep 17 00:00:00 2001 From: Stefan Behrens Date: Wed, 14 Nov 2012 18:57:29 +0000 Subject: [PATCH] --- yaml --- r: 346749 b: refs/heads/master c: 4ded4f639533ed5f02a0f0ab20d43bb9659c91f8 h: refs/heads/master i: 346747: 921951c00b59ea2bdcaa52e95f9a78f8897e69bd v: v3 --- [refs] | 2 +- trunk/fs/btrfs/scrub.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 0f2e99e9d2c7..ea2bb93f9b12 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6c760c072403f446ff829ec9e89568943a3c2ef2 +refs/heads/master: 4ded4f639533ed5f02a0f0ab20d43bb9659c91f8 diff --git a/trunk/fs/btrfs/scrub.c b/trunk/fs/btrfs/scrub.c index 8db6a6413a5f..bdbb94f245c9 100644 --- a/trunk/fs/btrfs/scrub.c +++ b/trunk/fs/btrfs/scrub.c @@ -785,6 +785,17 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check) BUG_ON(sblock_to_check->page_count < 1); fs_info = sctx->dev_root->fs_info; + if (sblock_to_check->pagev[0]->flags & BTRFS_EXTENT_FLAG_SUPER) { + /* + * if we find an error in a super block, we just report it. + * They will get written with the next transaction commit + * anyway + */ + spin_lock(&sctx->stat_lock); + ++sctx->stat.super_errors; + spin_unlock(&sctx->stat_lock); + return 0; + } length = sblock_to_check->page_count * PAGE_SIZE; logical = sblock_to_check->pagev[0]->logical; generation = sblock_to_check->pagev[0]->generation;