]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - drivers/md/persistent-data/dm-block-manager.c
dm persistent data: use DMERR_LIMIT for errors
[~shefty/rdma-dev.git] / drivers / md / persistent-data / dm-block-manager.c
index 47b683e67a7c51d2335421e7474fce890b6fb044..ec4cb3c58a0cfec8724d918c1c9bade69a9e1c61 100644 (file)
@@ -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;
                }
        }