@@ -125,10 +125,17 @@ EXPORT_SYMBOL(__wait_on_buffer);
static void buffer_io_error(struct buffer_head *bh, char *msg)
{
- if (!test_bit(BH_Quiet, &bh->b_state))
- printk_ratelimited(KERN_ERR
- "Buffer I/O error on dev %pg, logical block %llu%s\n",
- bh->b_bdev, (unsigned long long)bh->b_blocknr, msg);
+ struct device *gendev;
+
+ if (test_bit(BH_Quiet, &bh->b_state))
+ return;
+
+ gendev = bh->b_bdev->bd_disk ?
+ disk_to_dev(bh->b_bdev->bd_disk) : NULL;
+
+ durable_name_printk_ratelimited(KERN_ERR, gendev,
+ "Buffer I/O error on dev %pg, logical block %llu%s\n",
+ bh->b_bdev, (unsigned long long)bh->b_blocknr, msg);
}
/*
Replace printk_ratelimited with one that adds the key/value durable name to log entry. Signed-off-by: Tony Asleson <tasleson@redhat.com> --- fs/buffer.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)