Skip to contentSkip to conversation

please reconsider silently suppressing error messages

DISCUSSION Marc Lehmann 1 participant 1 message Jan 14, 2023 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi, I am not subscribed to the list.

I recently started a btrfs scrub on a filesystem where I suspected some data had been overwritten (externally to the filesystem, due to a faulty raid configuration).

Indeed, a single corrupted file was found and logged to the kernel log, which was easily deleted and restored from backup.

Unfortunately, the corruption stat count showed >200000 uncorrectable errors, a discrepancy that caused me to investigate.

To my surprise, it turned out that:

a) btrfs scrub _completely silently_ rate-limits error messages
b) the rate limit is hardcoded and, unlike the normal kernel rate limit mechanism, is not configurable in any way (so cannot be disabled).

So the only way to find out about scrub errors was to patch the kernel.

I think this is a higly suboptimal state of affairs - I can understand warnings being suppressed to some extent, but not file corruption errors, especially as there is no other way to get a list of errors. Even if, for some reason, corruption error messages should be rate limited, there at least should be a mechanism to configuire/disable this rate limit.

So please, reconsider rate-limit errors, especially those messages that pinpoint which blocks and files are affected. If btrfs scrub silently ignores errors (other than increasing a counter), its usefulness is greatly diminished. At the very leats, provide a way to disable this hardcoded limit other than by patching the kernel.

Thanks for considering this.

Signature · 6 lines
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\