mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jianyu Zhan <nasa4836@gmail.com>
To: axboe@kernel.dk
Cc: linux-kernel@vger.kernel.org, nasa4836@gmail.com
Subject: Re: [PATCH] block/blk-core.c: print readable string instead of values.
Date: Tue, 15 Apr 2014 14:10:20 +0800	[thread overview]
Message-ID: <1397542220-32690-1-git-send-email-nasa4836@gmail.com> (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.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
---
 block/blk-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index a0e3096..f8170c7 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -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));
 
-- 
1.9.0.GIT


             reply	other threads:[~2014-04-15  6:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15  6:10 Jianyu Zhan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-04-12  7:22 Jianyu Zhan
2014-04-14 22:00 ` Muthukumar R
2014-04-14 22:27   ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397542220-32690-1-git-send-email-nasa4836@gmail.com \
    --to=nasa4836@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®