]> www.infradead.org Git - users/hch/block.git/commitdiff
block: print the current process in handle_bad_sector
authorChristoph Hellwig <hch@lst.de>
Tue, 28 Sep 2021 05:27:55 +0000 (07:27 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 28 Sep 2021 20:48:02 +0000 (14:48 -0600)
Make the bad sector information a little more useful by printing
current->comm to identify the caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20210928052755.113016-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c

index 22c2982bb0bdf7f9358d0b6c53cb7503a05de9c9..61739f73b96441fb9a6e7332e29543e23ba065f2 100644 (file)
@@ -637,8 +637,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);
 }