block: print the current process in handle_bad_sector
PATCH 1/1 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 <[email protected]>
--- block/blk-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
block/blk-core.c +2 -1
@@ -636,8 +636,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); }
Signature · 1 line
2.30.2
Quoted 13 lines · Christoph Hellwig
Make the bad sector information a little more useful by printing
current->commto identify the caller.Signed-off-by Christoph Hellwig <[email protected]>--- block/blk-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)block/blk-core.c +0
-0
block/blk-core.c static void handle_bad_sector(struct bio *bio, sector_t maxsector) · line 644
Quoted 10 lines
block/blk-core.c +2
-1@@ -636,8 +636,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); }
Looks good. A stack dump, while noisier, would be even more useful :)
Reviewed-by Damien Le Moal <[email protected]>
Signature · 2 lines
Damien Le Moal Western Digital Research
Quoted 4 lines · Christoph Hellwig
Make the bad sector information a little more useful by printing
current->commto identify the caller.Signed-off-by Christoph Hellwig <[email protected]>
Looks good.
Reviewed-by Chaitanya Kulkarni <[email protected]>
Quoted 2 lines · Christoph Hellwig
Make the bad sector information a little more useful by printing
current->commto identify the caller.
Applied, thanks.
Signature · 1 line
Jens Axboe