diff options
author | Mike Snitzer <snitzer@redhat.com> | 2012-12-22 00:23:34 +0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2012-12-22 00:23:34 +0400 |
commit | 89ddeb8cb1383bfdfaaeb458f1c4a91e890cc60b (patch) | |
tree | 6dfbbe972b14927897b6cab55b833b64260d8329 /drivers/md/persistent-data/dm-block-manager.c | |
parent | a5bd968aeb87af4a3a96ecdd78912832997e8a9d (diff) | |
download | linux-89ddeb8cb1383bfdfaaeb458f1c4a91e890cc60b.tar.xz |
dm persistent data: use DMERR_LIMIT for errors
Nearly all of persistent-data is in the IO path so throttle error
messages with DMERR_LIMIT to limit the amount logged when
something has gone wrong.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/persistent-data/dm-block-manager.c')
-rw-r--r-- | drivers/md/persistent-data/dm-block-manager.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/md/persistent-data/dm-block-manager.c b/drivers/md/persistent-data/dm-block-manager.c index 47b683e67a7c..ec4cb3c58a0c 100644 --- a/drivers/md/persistent-data/dm-block-manager.c +++ b/drivers/md/persistent-data/dm-block-manager.c @@ -429,17 +429,16 @@ static int dm_bm_validate_buffer(struct dm_block_manager *bm, return 0; r = v->check(v, (struct dm_block *) buf, dm_bufio_get_block_size(bm->bufio)); if (unlikely(r)) { - DMERR("%s validator check failed for block %llu", v->name, - (unsigned long long) dm_bufio_get_block_number(buf)); + DMERR_LIMIT("%s validator check failed for block %llu", v->name, + (unsigned long long) dm_bufio_get_block_number(buf)); return r; } aux->validator = v; } else { if (unlikely(aux->validator != v)) { - DMERR("validator mismatch (old=%s vs new=%s) for block %llu", - aux->validator->name, v ? v->name : "NULL", - (unsigned long long) - dm_bufio_get_block_number(buf)); + DMERR_LIMIT("validator mismatch (old=%s vs new=%s) for block %llu", + aux->validator->name, v ? v->name : "NULL", + (unsigned long long) dm_bufio_get_block_number(buf)); return -EINVAL; } } |