lkml.org 
[lkml]   [2014]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] block/blk-core.c: print readable string instead of values.
Date
Print the r/w direction string instead of internal values.

Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
---
block/blk-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index a0e3096..0a3bde3 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1625,9 +1625,9 @@ 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: rw=%s, want=%Lu, limit=%Lu\n",
bdevname(bio->bi_bdev, b),
- bio->bi_rw,
+ (bio->bi_rw & WRITE) ? "WRITE" : "READ",
(unsigned long long)bio_end_sector(bio),
(long long)(i_size_read(bio->bi_bdev->bd_inode) >> 9));

--
1.9.0.GIT


\
 
 \ /
  Last update: 2014-04-12 09:41    [W:0.035 / U:0.884 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site