Commit 8a3ee677 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20210928052755.113016-1-hch@lst.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 322cff70
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
}