public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	Steven Rostedt <rostedt@goodmis.org>,
	namhyung@gmail.com, agk@redhat.com, dm-devel@redhat.com,
	neilb@suse.de, LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [BUG REPORT] Kernel panic on 3.9.0-rc7-4-gbb33db7
Date: Thu, 18 Apr 2013 10:52:51 -0700	[thread overview]
Message-ID: <20130418175251.GC9897@mtj.dyndns.org> (raw)
In-Reply-To: <517006F6.7030806@cn.fujitsu.com>

Hello, Wanlong.

On Thu, Apr 18, 2013 at 10:45:10PM +0800, Wanlong Gao wrote:
> OK, but I should capture it tomorrow morning because this remote machine has already panicked
> and need hard reboot.

Can you please apply the following patch when you try the next time
and report the kernel log?  It should prevent the oops from happening
and dump information on at least who are the involved parties.

Thanks.

diff --git a/block/blk-core.c b/block/blk-core.c
index 074b758..d5efebe 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -150,6 +150,8 @@ void blk_rq_init(struct request_queue *q, struct request *rq)
 }
 EXPORT_SYMBOL(blk_rq_init);
 
+
+
 static void req_bio_endio(struct request *rq, struct bio *bio,
 			  unsigned int nbytes, int error)
 {
@@ -174,8 +176,15 @@ static void req_bio_endio(struct request *rq, struct bio *bio,
 		bio_integrity_advance(bio, nbytes);
 
 	/* don't actually finish bio if it's part of flush sequence */
-	if (bio->bi_size == 0 && !(rq->cmd_flags & REQ_FLUSH_SEQ))
+	if (bio->bi_size == 0 && !(rq->cmd_flags & REQ_FLUSH_SEQ)) {
+		if (bio->bi_bdev && (unsigned long)bio->bi_bdev < 4096) {
+			printk_ratelimited("XXX req_bio_endio: queue %s bio=%p bi_bdev=%p bi_end_io=%pf\n",
+					   (rq->q && rq->q->backing_dev_info.dev) ?
+					   dev_name(rq->q->backing_dev_info.dev) : "<unknown>",
+					   bio, bio->bi_bdev, bio->bi_end_io);
+		}
 		bio_endio(bio, error);
+	}
 }
 
 void blk_dump_rq_flags(struct request *rq, char *msg)
diff --git a/fs/bio.c b/fs/bio.c
index bb5768f..da64e5a 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -1428,7 +1428,10 @@ void bio_endio(struct bio *bio, int error)
 	else if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
 		error = -EIO;
 
-	trace_block_bio_complete(bio, error);
+	if (bio->bi_bdev && (unsigned long)bio->bi_bdev < 4096)
+		printk_ratelimited("XXX bio_endio: skipping TP for %p\n", bio);
+	else
+		trace_block_bio_complete(bio, error);
 
 	if (bio->bi_end_io)
 		bio->bi_end_io(bio, error);

  reply	other threads:[~2013-04-18 17:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17  8:36 [BUG REPORT] Kernel panic on 3.9.0-rc7-4-gbb33db7 Wanlong Gao
2013-04-17 14:46 ` Steven Rostedt
2013-04-18 12:37   ` Jens Axboe
2013-04-18 12:54     ` Wanlong Gao
2013-04-18 13:35       ` Jens Axboe
2013-04-18 14:14         ` Wanlong Gao
2013-04-18 14:30           ` Jens Axboe
2013-04-18 14:45             ` Wanlong Gao
2013-04-18 17:52               ` Tejun Heo [this message]
2013-04-19  4:06                 ` Wanlong Gao
2013-04-18 16:08             ` Linus Torvalds
2013-04-18 17:27               ` Tejun Heo
2013-04-18 17:39                 ` Jens Axboe
2013-04-18 18:07                   ` Tejun Heo
2013-04-18 18:13                     ` Jens Axboe
2013-04-18 19:10                       ` Linus Torvalds
2013-04-18 20:37                         ` Jens Axboe
2013-04-19  1:08                           ` srostedt@gmail.com
2013-04-19  6:10                         ` Wanlong Gao
2013-04-19  3:33             ` Wanlong Gao
2013-04-19  5:57               ` Tejun Heo
2013-04-19  6:17                 ` Tejun Heo
2013-04-19  6:30                   ` Wanlong Gao
2013-04-19 13:31                   ` Jens Axboe
2013-04-19  8:24                 ` Jan Schmidt
2013-04-19 12:15                 ` Chris Mason
2013-04-19 13:32                 ` Jens Axboe
2013-04-19 13:52                   ` Chris Mason

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=20130418175251.GC9897@mtj.dyndns.org \
    --to=tj@kernel.org \
    --cc=agk@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=gaowanlong@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@gmail.com \
    --cc=neilb@suse.de \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.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