fs: clarify rate limit suppressed buffer I/O errors
authorRobert Elliott <elliott@hp.com>
Tue, 21 Oct 2014 19:55:11 +0000 (13:55 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 21 Oct 2014 19:55:11 +0000 (13:55 -0600)
commit432f16e64f50fd4999a476543d04dd52f7a2d753
tree335a65b0145eb02a4f4854e5c6e768c884dc2db8
parentb744c2ac4bbc040794efb33207d6ebc14f88ea2e
fs: clarify rate limit suppressed buffer I/O errors

When quiet_error applies rate limiting to buffer_io_error calls, what the
they apply to is unclear because the name is so generic, particularly
if the messages are interleaved with others:

[ 1936.063572] quiet_error: 664293 callbacks suppressed
[ 1936.065297] Buffer I/O error on dev sdr, logical block 257429952, lost async page write
[ 1936.067814] Buffer I/O error on dev sdr, logical block 257429953, lost async page write

Also, the function uses printk_ratelimit(), although printk.h includes a
comment advising "Please don't use... Instead use printk_ratelimited()."

Change buffer_io_error to check the BH_Quiet bit itself, drop the
printk_ratelimit call, and print using printk_ratelimited.

This makes the messages look like:

[  387.208839] buffer_io_error: 676394 callbacks suppressed
[  387.210693] Buffer I/O error on dev sdr, logical block 211291776, lost async page write
[  387.213432] Buffer I/O error on dev sdr, logical block 211291777, lost async page write

Signed-off-by: Robert Elliott <elliott@hp.com>
Reviewed-by: Webb Scales <webbnh@hp.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
fs/buffer.c