From patchwork Thu Apr 18 17:52:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 2462071 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by patchwork1.kernel.org (Postfix) with ESMTP id B86D63FCA5 for ; Thu, 18 Apr 2013 17:55:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3IHqx14003430; Thu, 18 Apr 2013 13:53:00 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3IHqv1s032218 for ; Thu, 18 Apr 2013 13:52:57 -0400 Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.19]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3IHquau012113; Thu, 18 Apr 2013 13:52:56 -0400 Received: from mail-da0-f41.google.com (mail-da0-f41.google.com [209.85.210.41]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3IHqt17003580; Thu, 18 Apr 2013 13:52:55 -0400 Received: by mail-da0-f41.google.com with SMTP id p8so1377629dan.14 for ; Thu, 18 Apr 2013 10:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=0DHQi1lRxioptWKIUlqXe4c7I1kbNANYvyxj3nDGkvQ=; b=UmqxqYKFz/1JkhuqeyMXwbs0XSJzC3QB7dLfulw9xFGN8dGK0DmjjHavlrqZvCY2Yk Tc9RdSvF3Gnq0LR4l+pAmA3j68JdVUDQwXIBp2tQZXQASa2wyRX1USjoB4SPnhbnfmao yj5tFnFdQeimqeKpnNZ+I8IHHrmXXG9KxTB7VrVGeOsE8meMuZe7JYWAsMst39w+OZpT UXQQyrcq3bareozcYpZNDv4kmt1F0S4F/G+B+GSB5m8dx43uXjycmUy2sEcEc0KnmYRf DpYpHFVg/68eE9KU+33Oq7qsVAOCHZUWHUT10DJw+pwCfqyPqqRT275VrdhUskeC4qwv Rk6w== X-Received: by 10.66.48.201 with SMTP id o9mr14261507pan.196.1366307574998; Thu, 18 Apr 2013 10:52:54 -0700 (PDT) Received: from mtj.dyndns.org ([69.38.217.10]) by mx.google.com with ESMTPS id ts3sm10605263pbc.12.2013.04.18.10.52.53 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 18 Apr 2013 10:52:54 -0700 (PDT) Date: Thu, 18 Apr 2013 10:52:51 -0700 From: Tejun Heo To: Wanlong Gao Message-ID: <20130418175251.GC9897@mtj.dyndns.org> References: <516E5EF8.9090507@cn.fujitsu.com> <1366209997.8817.12.camel@pippen.local.home> <20130418123738.GV4816@kernel.dk> <516FED09.1040008@cn.fujitsu.com> <20130418133546.GX4816@kernel.dk> <516FFFAC.8040103@cn.fujitsu.com> <20130418143014.GZ4816@kernel.dk> <517006F6.7030806@cn.fujitsu.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <517006F6.7030806@cn.fujitsu.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-RedHat-Spam-Score: -2.6 (BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.19 X-loop: dm-devel@redhat.com Cc: Jens Axboe , namhyung@gmail.com, LKML , Steven Rostedt , dm-devel@redhat.com, Linus Torvalds , agk@redhat.com Subject: Re: [dm-devel] [BUG REPORT] Kernel panic on 3.9.0-rc7-4-gbb33db7 X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.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. --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel 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) : "", + 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);