]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - drivers/md/persistent-data/dm-space-map-common.c
dm persistent data: use DMERR_LIMIT for errors
[~shefty/rdma-dev.git] / drivers / md / persistent-data / dm-space-map-common.c
index f3a9af8cdec3514448ae3f6ce9cb12ecca7f20ae..3e7a88d99eb0260ce4e9128f94349713b28170c5 100644 (file)
@@ -39,8 +39,8 @@ static int index_check(struct dm_block_validator *v,
        __le32 csum_disk;
 
        if (dm_block_location(b) != le64_to_cpu(mi_le->blocknr)) {
-               DMERR("index_check failed blocknr %llu wanted %llu",
-                     le64_to_cpu(mi_le->blocknr), dm_block_location(b));
+               DMERR_LIMIT("index_check failed: blocknr %llu != wanted %llu",
+                           le64_to_cpu(mi_le->blocknr), dm_block_location(b));
                return -ENOTBLK;
        }
 
@@ -48,8 +48,8 @@ static int index_check(struct dm_block_validator *v,
                                               block_size - sizeof(__le32),
                                               INDEX_CSUM_XOR));
        if (csum_disk != mi_le->csum) {
-               DMERR("index_check failed csum %u wanted %u",
-                     le32_to_cpu(csum_disk), le32_to_cpu(mi_le->csum));
+               DMERR_LIMIT("index_check failed: csum %u != wanted %u",
+                           le32_to_cpu(csum_disk), le32_to_cpu(mi_le->csum));
                return -EILSEQ;
        }
 
@@ -89,8 +89,8 @@ static int bitmap_check(struct dm_block_validator *v,
        __le32 csum_disk;
 
        if (dm_block_location(b) != le64_to_cpu(disk_header->blocknr)) {
-               DMERR("bitmap check failed blocknr %llu wanted %llu",
-                     le64_to_cpu(disk_header->blocknr), dm_block_location(b));
+               DMERR_LIMIT("bitmap check failed: blocknr %llu != wanted %llu",
+                           le64_to_cpu(disk_header->blocknr), dm_block_location(b));
                return -ENOTBLK;
        }
 
@@ -98,8 +98,8 @@ static int bitmap_check(struct dm_block_validator *v,
                                               block_size - sizeof(__le32),
                                               BITMAP_CSUM_XOR));
        if (csum_disk != disk_header->csum) {
-               DMERR("bitmap check failed csum %u wanted %u",
-                     le32_to_cpu(csum_disk), le32_to_cpu(disk_header->csum));
+               DMERR_LIMIT("bitmap check failed: csum %u != wanted %u",
+                           le32_to_cpu(csum_disk), le32_to_cpu(disk_header->csum));
                return -EILSEQ;
        }