btrfs: switch message printers to ratelimited _in_rcu variants
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -3175,8 +3175,8 @@ static void btrfs_end_buffer_write_sync(struct buffer_head *bh, int uptodate)
|
|||||||
struct btrfs_device *device = (struct btrfs_device *)
|
struct btrfs_device *device = (struct btrfs_device *)
|
||||||
bh->b_private;
|
bh->b_private;
|
||||||
|
|
||||||
printk_ratelimited_in_rcu(KERN_WARNING "BTRFS: lost page write due to "
|
btrfs_warn_rl_in_rcu(device->dev_root->fs_info,
|
||||||
"I/O error on %s\n",
|
"lost page write due to IO error on %s",
|
||||||
rcu_str_deref(device->name));
|
rcu_str_deref(device->name));
|
||||||
/* note, we dont' set_buffer_write_io_error because we have
|
/* note, we dont' set_buffer_write_io_error because we have
|
||||||
* our own ways of dealing with the IO errors
|
* our own ways of dealing with the IO errors
|
||||||
|
|||||||
@@ -2078,8 +2078,8 @@ int repair_io_failure(struct inode *inode, u64 start, u64 length, u64 logical,
|
|||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
printk_ratelimited_in_rcu(KERN_INFO
|
btrfs_info_rl_in_rcu(fs_info,
|
||||||
"BTRFS: read error corrected: ino %llu off %llu (dev %s sector %llu)\n",
|
"read error corrected: ino %llu off %llu (dev %s sector %llu)",
|
||||||
btrfs_ino(inode), start,
|
btrfs_ino(inode), start,
|
||||||
rcu_str_deref(dev->name), sector);
|
rcu_str_deref(dev->name), sector);
|
||||||
bio_put(bio);
|
bio_put(bio);
|
||||||
|
|||||||
@@ -850,8 +850,8 @@ out:
|
|||||||
btrfs_dev_replace_stats_inc(
|
btrfs_dev_replace_stats_inc(
|
||||||
&sctx->dev_root->fs_info->dev_replace.
|
&sctx->dev_root->fs_info->dev_replace.
|
||||||
num_uncorrectable_read_errors);
|
num_uncorrectable_read_errors);
|
||||||
printk_ratelimited_in_rcu(KERN_ERR "BTRFS: "
|
btrfs_err_rl_in_rcu(sctx->dev_root->fs_info,
|
||||||
"unable to fixup (nodatasum) error at logical %llu on dev %s\n",
|
"unable to fixup (nodatasum) error at logical %llu on dev %s",
|
||||||
fixup->logical, rcu_str_deref(fixup->dev->name));
|
fixup->logical, rcu_str_deref(fixup->dev->name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1230,8 +1230,8 @@ corrected_error:
|
|||||||
sctx->stat.corrected_errors++;
|
sctx->stat.corrected_errors++;
|
||||||
sblock_to_check->data_corrected = 1;
|
sblock_to_check->data_corrected = 1;
|
||||||
spin_unlock(&sctx->stat_lock);
|
spin_unlock(&sctx->stat_lock);
|
||||||
printk_ratelimited_in_rcu(KERN_ERR
|
btrfs_err_rl_in_rcu(fs_info,
|
||||||
"BTRFS: fixed up error at logical %llu on dev %s\n",
|
"fixed up error at logical %llu on dev %s",
|
||||||
logical, rcu_str_deref(dev->name));
|
logical, rcu_str_deref(dev->name));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1239,8 +1239,8 @@ did_not_correct_error:
|
|||||||
spin_lock(&sctx->stat_lock);
|
spin_lock(&sctx->stat_lock);
|
||||||
sctx->stat.uncorrectable_errors++;
|
sctx->stat.uncorrectable_errors++;
|
||||||
spin_unlock(&sctx->stat_lock);
|
spin_unlock(&sctx->stat_lock);
|
||||||
printk_ratelimited_in_rcu(KERN_ERR
|
btrfs_err_rl_in_rcu(fs_info,
|
||||||
"BTRFS: unable to fixup (regular) error at logical %llu on dev %s\n",
|
"unable to fixup (regular) error at logical %llu on dev %s",
|
||||||
logical, rcu_str_deref(dev->name));
|
logical, rcu_str_deref(dev->name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2201,15 +2201,15 @@ static void scrub_missing_raid56_worker(struct btrfs_work *work)
|
|||||||
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);
|
||||||
printk_ratelimited_in_rcu(KERN_ERR
|
btrfs_err_rl_in_rcu(fs_info,
|
||||||
"BTRFS: I/O error rebulding logical %llu for dev %s\n",
|
"IO error rebuilding logical %llu for dev %s",
|
||||||
logical, rcu_str_deref(dev->name));
|
logical, rcu_str_deref(dev->name));
|
||||||
} else if (sblock->header_error || sblock->checksum_error) {
|
} else if (sblock->header_error || sblock->checksum_error) {
|
||||||
spin_lock(&sctx->stat_lock);
|
spin_lock(&sctx->stat_lock);
|
||||||
sctx->stat.uncorrectable_errors++;
|
sctx->stat.uncorrectable_errors++;
|
||||||
spin_unlock(&sctx->stat_lock);
|
spin_unlock(&sctx->stat_lock);
|
||||||
printk_ratelimited_in_rcu(KERN_ERR
|
btrfs_err_rl_in_rcu(fs_info,
|
||||||
"BTRFS: failed to rebuild valid logical %llu for dev %s\n",
|
"failed to rebuild valid logical %llu for dev %s",
|
||||||
logical, rcu_str_deref(dev->name));
|
logical, rcu_str_deref(dev->name));
|
||||||
} else {
|
} else {
|
||||||
scrub_write_block_to_dev_replace(sblock);
|
scrub_write_block_to_dev_replace(sblock);
|
||||||
|
|||||||
@@ -6675,8 +6675,8 @@ static void btrfs_dev_stat_print_on_error(struct btrfs_device *dev)
|
|||||||
{
|
{
|
||||||
if (!dev->dev_stats_valid)
|
if (!dev->dev_stats_valid)
|
||||||
return;
|
return;
|
||||||
printk_ratelimited_in_rcu(KERN_ERR "BTRFS: "
|
btrfs_err_rl_in_rcu(dev->dev_root->fs_info,
|
||||||
"bdev %s errs: wr %u, rd %u, flush %u, corrupt %u, gen %u\n",
|
"bdev %s errs: wr %u, rd %u, flush %u, corrupt %u, gen %u",
|
||||||
rcu_str_deref(dev->name),
|
rcu_str_deref(dev->name),
|
||||||
btrfs_dev_stat_read(dev, BTRFS_DEV_STAT_WRITE_ERRS),
|
btrfs_dev_stat_read(dev, BTRFS_DEV_STAT_WRITE_ERRS),
|
||||||
btrfs_dev_stat_read(dev, BTRFS_DEV_STAT_READ_ERRS),
|
btrfs_dev_stat_read(dev, BTRFS_DEV_STAT_READ_ERRS),
|
||||||
|
|||||||
Reference in New Issue
Block a user