From patchwork Thu Apr 18 13:35:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 2460791 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 0D1183FCA5 for ; Thu, 18 Apr 2013 13:38:56 +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 r3IDa3VT007883; Thu, 18 Apr 2013 09:36:04 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3IDa1ZB005999 for ; Thu, 18 Apr 2013 09:36:01 -0400 Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com [10.5.110.17]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3IDa12Z031798; Thu, 18 Apr 2013 09:36:01 -0400 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3IDZxcr019027; Thu, 18 Apr 2013 09:36:00 -0400 Received: from kernel.dk ([54.225.238.116]) by merlin.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1USp09-0006he-RZ; Thu, 18 Apr 2013 13:35:49 +0000 Received: from localhost (unknown [69.38.217.3]) by kernel.dk (Postfix) with ESMTPA id 79FF320C51; Thu, 18 Apr 2013 13:35:48 +0000 (UTC) Date: Thu, 18 Apr 2013 06:35:46 -0700 From: Jens Axboe To: Wanlong Gao Message-ID: <20130418133546.GX4816@kernel.dk> References: <516E5EF8.9090507@cn.fujitsu.com> <1366209997.8817.12.camel@pippen.local.home> <20130418123738.GV4816@kernel.dk> <516FED09.1040008@cn.fujitsu.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <516FED09.1040008@cn.fujitsu.com> X-RedHat-Spam-Score: -3.935 (BAYES_00, DCC_REPUT_00_12, RCVD_IN_DNSWL_MED, SPF_SOFTFAIL) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.17 X-loop: dm-devel@redhat.com Cc: namhyung@gmail.com, LKML , Steven Rostedt , dm-devel@redhat.com, Tejun Heo , 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 On Thu, Apr 18 2013, Wanlong Gao wrote: > > A bio is always fully initialized, regardless of which internal > > allocator it came from. If people are doing private kmallocs, then they > > better be using bio_init() as well. > > > > Wanlong, would it be possible to get a full dmesg on boot see I can see > > what drivers and file systems are in use? Anything special about your > > setup. > > Sure, attached. Does the below help? diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 9e5b8c2..f9a51a6 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -780,15 +780,23 @@ static void blk_add_trace_bio_bounce(void *ignore, blk_add_trace_bio(q, bio, BLK_TA_BOUNCE, 0); } +static struct request_queue *blk_trace_get_queue(struct block_device *bdev) +{ + if (bdev->bd_disk == NULL) + return NULL; + + return bdev_get_queue(bdev); +} + static void blk_add_trace_bio_complete(void *ignore, struct bio *bio, int error) { struct request_queue *q; struct blk_trace *bt; - if (!bio->bi_bdev) + q = blk_trace_get_queue(bio->bi_bdev); + if (!q) return; - q = bdev_get_queue(bio->bi_bdev); bt = q->blk_trace; /* @@ -1641,14 +1649,6 @@ static ssize_t blk_trace_mask2str(char *buf, int mask) return p - buf; } -static struct request_queue *blk_trace_get_queue(struct block_device *bdev) -{ - if (bdev->bd_disk == NULL) - return NULL; - - return bdev_get_queue(bdev); -} - static ssize_t sysfs_blk_trace_attr_show(struct device *dev, struct device_attribute *attr, char *buf)