Skip to contentSkip to conversation

block/blk-core.c: print readable string instead of values.

PATCH Jianyu Zhan 1 participant 1 message Apr 15, 2014 Block layer

lore
Share & tools
lore
#0 lore raw

Hi, Joe Perches, I think your suggestion is more desirable. The message is too long, I broke it into two lines. Thanks.

---<8---

Also print the r/w direction string instead of only internal values.

---
 block/blk-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
block/blk-core.c +3 -3
index a0e3096..f8170c7 100644
@@ -1624,10 +1624,10 @@ static void handle_bad_sector(struct bio *bio)
 {
 	char b[BDEVNAME_SIZE];
 
-	printk(KERN_INFO "attempt to access beyond end of device\n");
-	printk(KERN_INFO "%s: rw=%ld, want=%Lu, limit=%Lu\n",
+	printk(KERN_INFO "%s: attempt to access beyond end of device - "
+			"rw=%s(%lx), want=%Lu, limit=%Lu\n",
 			bdevname(bio->bi_bdev, b),
-			bio->bi_rw,
+			bio->bi_rw & WRITE ? "WRITE" : "READ", bio->bi_rw,
 			(unsigned long long)bio_end_sector(bio),
 			(long long)(i_size_read(bio->bi_bdev->bd_inode) >> 9));
 
Signature · 1 line
1.9.0.GIT