Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761367AbXJQUHA (ORCPT ); Wed, 17 Oct 2007 16:07:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755246AbXJQUGr (ORCPT ); Wed, 17 Oct 2007 16:06:47 -0400 Received: from brick.kernel.dk ([87.55.233.238]:12661 "EHLO kernel.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757884AbXJQUGp (ORCPT ); Wed, 17 Oct 2007 16:06:45 -0400 Date: Wed, 17 Oct 2007 22:06:40 +0200 From: Jens Axboe To: Linus Torvalds Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Jeff Garzik , Alan Cox Subject: Re: [bug] ata subsystem related crash with latest -git Message-ID: <20071017200638.GE15552@kernel.dk> References: <20071017172932.GI15552@kernel.dk> <20071017173408.GA1960@elte.hu> <20071017174503.GA4622@elte.hu> <20071017175337.GN15552@kernel.dk> <20071017183716.GU15552@kernel.dk> <20071017190901.GA13780@elte.hu> <20071017193542.GA15552@kernel.dk> <20071017195659.GD15552@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071017195659.GD15552@kernel.dk> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1398 Lines: 42 On Wed, Oct 17 2007, Jens Axboe wrote: > On Wed, Oct 17 2007, Linus Torvalds wrote: > > > > > > On Wed, 17 Oct 2007, Jens Axboe wrote: > > > > > > OK, I think you have a very good point here. Ingo, can you verify it > > > goes away if apply the below? I have to tend to Other Life stuff but > > > will take this up again tomorrow morning and fix the sg_next() usage. > > > > This one will only fix the ones that use the SCSI-lib routines, so it will > > leave everything else broken, no? > > Yes, it'll still crap out if you use debug page alloc for anything else > :/ So until that is fixed up, how about this? Should cover all block devices, and I don't think sg_next()/for_each_sg() has spread outside of that yet. diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 3935469..8708ad0 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -631,7 +631,7 @@ void blk_queue_max_phys_segments(struct request_queue *q, printk("%s: set to minimum %d\n", __FUNCTION__, max_segments); } - q->max_phys_segments = max_segments; + q->max_phys_segments = max_segments - 1; } EXPORT_SYMBOL(blk_queue_max_phys_segments); -- Jens Axboe - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/