* [PATCH v1] pstore/ram: Rate-limit "uncorrectable error in header" message
@ 2021-03-02 9:58 Dmitry Osipenko
2021-03-02 22:53 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Osipenko @ 2021-03-02 9:58 UTC (permalink / raw)
To: Kees Cook, Anton Vorontsov, Colin Cross, Tony Luck; +Cc: linux-kernel
There is a quite huge "uncorrectable error in header" flood in KMSG
on a clean system boot since there is no pstore buffer saved in RAM.
Let's silence the redundant noisy messages by rate-limiting the printk
message. Now there are maximum 10 messages printed repeatedly instead
of 35+.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
fs/pstore/ram_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index aa8e0b65ff1a..fff363bfd484 100644
--- a/fs/pstore/ram_core.c
+++ b/fs/pstore/ram_core.c
@@ -246,7 +246,7 @@ static int persistent_ram_init_ecc(struct persistent_ram_zone *prz,
pr_info("error in header, %d\n", numerr);
prz->corrected_bytes += numerr;
} else if (numerr < 0) {
- pr_info("uncorrectable error in header\n");
+ pr_info_ratelimited("uncorrectable error in header\n");
prz->bad_blocks++;
}
--
2.29.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1] pstore/ram: Rate-limit "uncorrectable error in header" message
2021-03-02 9:58 [PATCH v1] pstore/ram: Rate-limit "uncorrectable error in header" message Dmitry Osipenko
@ 2021-03-02 22:53 ` Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2021-03-02 22:53 UTC (permalink / raw)
To: Dmitry Osipenko, Anton Vorontsov, Tony Luck, Colin Cross
Cc: Kees Cook, linux-kernel
On Tue, 2 Mar 2021 12:58:50 +0300, Dmitry Osipenko wrote:
> There is a quite huge "uncorrectable error in header" flood in KMSG
> on a clean system boot since there is no pstore buffer saved in RAM.
> Let's silence the redundant noisy messages by rate-limiting the printk
> message. Now there are maximum 10 messages printed repeatedly instead
> of 35+.
Applied to for-next/pstore, thanks!
[1/1] pstore/ram: Rate-limit "uncorrectable error in header" message
https://git.kernel.org/kees/c/7db688e99c0f
--
Kees Cook
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-03 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 9:58 [PATCH v1] pstore/ram: Rate-limit "uncorrectable error in header" message Dmitry Osipenko
2021-03-02 22:53 ` Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®