From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261920AbUEVVa0 (ORCPT ); Sat, 22 May 2004 17:30:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261925AbUEVVa0 (ORCPT ); Sat, 22 May 2004 17:30:26 -0400 Received: from ns.virtualhost.dk ([195.184.98.160]:37532 "EHLO virtualhost.dk") by vger.kernel.org with ESMTP id S261920AbUEVVaY (ORCPT ); Sat, 22 May 2004 17:30:24 -0400 Date: Sat, 22 May 2004 23:30:18 +0200 From: Jens Axboe To: Andrew Morton Cc: Lorenzo Allegrucci , linux-kernel@vger.kernel.org Subject: Re: 2.6.6-mm5 oops mounting ext3 or reiserfs with -o barrier Message-ID: <20040522213018.GA31224@suse.de> References: <200405222107.55505.l_allegrucci@despammed.com> <20040522122126.2940f8f4.akpm@osdl.org> <20040522212028.GA31188@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040522212028.GA31188@suse.de> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 22 2004, Jens Axboe wrote: > On Sat, May 22 2004, Andrew Morton wrote: > > Lorenzo Allegrucci wrote: > > > > > > > > > I get a 100% reproducible oops mounting an ext3 or reiserfs > > > partition with -o barrier enabled. > > > Hand written oops (for ext3): > > > > That's a lot of hand-writing. Thanks for doing that. You can usually omit > > the hex numbers in [brackets] when doing this. > > > > The crash is here: > > > > static inline void blkdev_dequeue_request(struct request *req) > > { > > BUG_ON(list_empty(&req->queuelist)); > > > > perhaps related to that I/O error sending the code through less-tested > > paths. > > Ouch indeed, I'll get that fixed up first thing in the morning. Can you test this work-around? The work-around should be perfectly safe, this is just a case where a BUG_ON() does more harm than good :-) --- drivers/ide/ide-io.c~ 2004-05-21 11:02:58.000000000 +0200 +++ drivers/ide/ide-io.c 2004-05-22 23:28:37.692944185 +0200 @@ -291,6 +291,8 @@ sector = real_rq->hard_sector; bad_sectors = real_rq->hard_nr_sectors - good_sectors; + /* work-around, make sure request is on queue */ + elv_requeue_request(drive->queue, real_rq); if (good_sectors) __ide_end_request(drive, real_rq, 1, good_sectors); if (bad_sectors) -- Jens Axboe