Message ID | 20200623191749.115200-5-tasleson@redhat.com |
---|---|
State | New |
Headers | show |
Series | Add persistent durable identifier to storage log messages | expand |
diff --git a/fs/buffer.c b/fs/buffer.c index a60f60396cfa..97b8f455c031 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -133,10 +133,16 @@ __clear_page_buffers(struct page *page) static void buffer_io_error(struct buffer_head *bh, char *msg) { - if (!test_bit(BH_Quiet, &bh->b_state)) - printk_ratelimited(KERN_ERR + if (!test_bit(BH_Quiet, &bh->b_state)) { + struct device *gendev; + + gendev = (bh->b_bdev->bd_disk) ? + disk_to_dev(bh->b_bdev->bd_disk) : NULL; + + dev_err_ratelimited(gendev, "Buffer I/O error on dev %pg, logical block %llu%s\n", bh->b_bdev, (unsigned long long)bh->b_blocknr, msg); + } } /*
Signed-off-by: Tony Asleson <tasleson@redhat.com> --- fs/buffer.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)