From 8a3ee6778ef1a9a3bfd3b1134ea29e95d3568271 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 28 Sep 2021 07:27:55 +0200 Subject: [PATCH] block: print the current process in handle_bad_sector Make the bad sector information a little more useful by printing current->comm to identify the caller. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210928052755.113016-1-hch@lst.de Signed-off-by: Jens Axboe --- block/blk-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index d2c6caa..4695508 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -655,8 +655,9 @@ static void handle_bad_sector(struct bio *bio, sector_t maxsector) { char b[BDEVNAME_SIZE]; - pr_info_ratelimited("attempt to access beyond end of device\n" + pr_info_ratelimited("%s: attempt to access beyond end of device\n" "%s: rw=%d, want=%llu, limit=%llu\n", + current->comm, bio_devname(bio, b), bio->bi_opf, bio_end_sector(bio), maxsector); } -- 2.7.4