fs: ratelimit __find_get_block_slow() failure message.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Mon, 21 Jan 2019 13:49:37 +0000 (22:49 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 6 Feb 2019 19:58:56 +0000 (12:58 -0700)
commit43636c804df0126da669c261fc820fb22f62bfc2
tree77f8c5c0bdcc4afd817aa1369e8ba4e438469281
parent30363d6506d0d202bb14f4dac36d9b4b0714ad8d
fs: ratelimit __find_get_block_slow() failure message.

When something let __find_get_block_slow() hit all_mapped path, it calls
printk() for 100+ times per a second. But there is no need to print same
message with such high frequency; it is just asking for stall warning, or
at least bloating log files.

  [  399.866302][T15342] __find_get_block_slow() failed. block=1, b_blocknr=8
  [  399.873324][T15342] b_state=0x00000029, b_size=512
  [  399.878403][T15342] device loop0 blocksize: 4096
  [  399.883296][T15342] __find_get_block_slow() failed. block=1, b_blocknr=8
  [  399.890400][T15342] b_state=0x00000029, b_size=512
  [  399.895595][T15342] device loop0 blocksize: 4096
  [  399.900556][T15342] __find_get_block_slow() failed. block=1, b_blocknr=8
  [  399.907471][T15342] b_state=0x00000029, b_size=512
  [  399.912506][T15342] device loop0 blocksize: 4096

This patch reduces frequency to up to once per a second, in addition to
concatenating three lines into one.

  [  399.866302][T15342] __find_get_block_slow() failed. block=1, b_blocknr=8, b_state=0x00000029, b_size=512, device loop0 blocksize: 4096

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/buffer.c