提交 8bb1cf1b 编写于 作者: D David Sterba

btrfs: scrub: rename ratelimit state varaible to avoid shadowing

There's already defined _rs within ctree.h:btrfs_printk_ratelimited,
local variables should not use _ to avoid such name clashes with
macro-local variables.
Reviewed-by: NJosef Bacik <josef@toxicpanda.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 0af447d0
...@@ -835,7 +835,7 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check) ...@@ -835,7 +835,7 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check)
int success; int success;
bool full_stripe_locked; bool full_stripe_locked;
unsigned int nofs_flag; unsigned int nofs_flag;
static DEFINE_RATELIMIT_STATE(_rs, DEFAULT_RATELIMIT_INTERVAL, static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL,
DEFAULT_RATELIMIT_BURST); DEFAULT_RATELIMIT_BURST);
BUG_ON(sblock_to_check->page_count < 1); BUG_ON(sblock_to_check->page_count < 1);
...@@ -969,14 +969,14 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check) ...@@ -969,14 +969,14 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check)
spin_lock(&sctx->stat_lock); spin_lock(&sctx->stat_lock);
sctx->stat.read_errors++; sctx->stat.read_errors++;
spin_unlock(&sctx->stat_lock); spin_unlock(&sctx->stat_lock);
if (__ratelimit(&_rs)) if (__ratelimit(&rs))
scrub_print_warning("i/o error", sblock_to_check); scrub_print_warning("i/o error", sblock_to_check);
btrfs_dev_stat_inc_and_print(dev, BTRFS_DEV_STAT_READ_ERRS); btrfs_dev_stat_inc_and_print(dev, BTRFS_DEV_STAT_READ_ERRS);
} else if (sblock_bad->checksum_error) { } else if (sblock_bad->checksum_error) {
spin_lock(&sctx->stat_lock); spin_lock(&sctx->stat_lock);
sctx->stat.csum_errors++; sctx->stat.csum_errors++;
spin_unlock(&sctx->stat_lock); spin_unlock(&sctx->stat_lock);
if (__ratelimit(&_rs)) if (__ratelimit(&rs))
scrub_print_warning("checksum error", sblock_to_check); scrub_print_warning("checksum error", sblock_to_check);
btrfs_dev_stat_inc_and_print(dev, btrfs_dev_stat_inc_and_print(dev,
BTRFS_DEV_STAT_CORRUPTION_ERRS); BTRFS_DEV_STAT_CORRUPTION_ERRS);
...@@ -984,7 +984,7 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check) ...@@ -984,7 +984,7 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check)
spin_lock(&sctx->stat_lock); spin_lock(&sctx->stat_lock);
sctx->stat.verify_errors++; sctx->stat.verify_errors++;
spin_unlock(&sctx->stat_lock); spin_unlock(&sctx->stat_lock);
if (__ratelimit(&_rs)) if (__ratelimit(&rs))
scrub_print_warning("checksum/header error", scrub_print_warning("checksum/header error",
sblock_to_check); sblock_to_check);
if (sblock_bad->generation_error) if (sblock_bad->generation_error)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册