mtdblock: make warning messages ratelimited
authorColin Ian King <colin.i.king@gmail.com>
Wed, 19 Jul 2023 10:33:54 +0000 (11:33 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 27 Jul 2023 15:16:14 +0000 (17:16 +0200)
commitd2236f6219fac62ee22d971e06a04148f4eb8cca
tree4e4fd5992742420a73db309c769278dde57f9513
parentc2fc6b6947905eee832e9ef445df4803f0056cc6
mtdblock: make warning messages ratelimited

When exercising various dev interfaces with stress-ng the mtdblock drivers
can be (ab)used to generate a lot of warning messages. Make these rate
limited to reduce the kernel log from being spammed with the same messages.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230719103354.2829366-1-colin.i.king@gmail.com
drivers/mtd/mtdblock.c
drivers/mtd/mtdblock_ro.c