dm verity: use message limit for data block corruption message
authorMilan Broz <gmazyland@gmail.com>
Thu, 20 Jun 2019 11:00:19 +0000 (13:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Jul 2019 07:04:40 +0000 (09:04 +0200)
[ Upstream commit 2eba4e640b2c4161e31ae20090a53ee02a518657 ]

DM verity should also use DMERR_LIMIT to limit repeat data block
corruption messages.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-verity-target.c

index 8573c70a1880ed96929b6cdcf210c606e14fa338..e705799976c2caddab4d38fd0342bd3d2deab2f3 100644 (file)
@@ -276,8 +276,8 @@ static int verity_handle_err(struct dm_verity *v, enum verity_block_type type,
                BUG();
        }
 
-       DMERR("%s: %s block %llu is corrupted", v->data_dev->name, type_str,
-               block);
+       DMERR_LIMIT("%s: %s block %llu is corrupted", v->data_dev->name,
+                   type_str, block);
 
        if (v->corrupted_errs == DM_VERITY_MAX_CORRUPTED_ERRS)
                DMERR("%s: reached maximum errors", v->data_dev->name);