dm integrity: limit the rate of error messages
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 6 Mar 2019 13:29:34 +0000 (08:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:10:09 +0000 (20:10 +0100)
commit5579d97e92f70d9e728b614e7d7d3cb3afbef245
treee8404d12fd18d3fc9b42cab8a913e46b5f7beee1
parent7668d6e45f3a0f4caade465e2df969a1948fc3a4
dm integrity: limit the rate of error messages

commit 225557446856448039a9e495da37b72c20071ef2 upstream.

When using dm-integrity underneath md-raid, some tests with raid
auto-correction trigger large amounts of integrity failures - and all
these failures print an error message. These messages can bring the
system to a halt if the system is using serial console.

Fix this by limiting the rate of error messages - it improves the speed
of raid recovery and avoids the hang.

Fixes: 7eada909bfd7a ("dm: add integrity target")
Cc: stable@vger.kernel.org # v4.12+
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-integrity.c