From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrian Bunk Subject: Re: [RFC] Badness in __mutex_unlock_slowpath with XFS stress tests Date: Fri, 17 Mar 2006 18:22:10 +0100 Message-ID: <20060317172210.GP3914@stusta.de> References: <440FDF3E.8060400@in.ibm.com> <20060309120306.GA26682@infradead.org> <20060309223042.GC1135@frodo> <20060309224219.GA6709@infradead.org> <20060309231422.GD1135@frodo> <20060310005020.GF1135@frodo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Suzuki , linux-fsdevel@vger.kernel.org, "linux-aio kvack.org" , lkml , suparna , akpm@osdl.org, linux-xfs@oss.sgi.com Return-path: Received: from emailhub.stusta.mhn.de ([141.84.69.5]:520 "HELO mailout.stusta.mhn.de") by vger.kernel.org with SMTP id S1030217AbWCQRWL (ORCPT ); Fri, 17 Mar 2006 12:22:11 -0500 To: Nathan Scott Content-Disposition: inline In-Reply-To: <20060310005020.GF1135@frodo> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Mar 10, 2006 at 11:50:20AM +1100, Nathan Scott wrote: > On Fri, Mar 10, 2006 at 10:14:22AM +1100, Nathan Scott wrote: > > On Thu, Mar 09, 2006 at 10:42:19PM +0000, Christoph Hellwig wrote: > > > On Fri, Mar 10, 2006 at 09:30:42AM +1100, Nathan Scott wrote: > > > > Not for reads AFAICT - __generic_file_aio_read + own-locking > > > > should always have released i_mutex at the end of the direct > > > > read - are you thinking of writes or have I missed something? > > > > > > if an error occurs before a_ops->direct_IO is called __generic_file_aio_read > > > will return with i_mutex still locked. Note that checking for negative > > > return values is not enough as __blockdev_direct_IO can return errors > > > aswell. > > > > *groan* - right you are. Another option may be to have the > > generic dio+own-locking case reacquire i_mutex if it drops > > it, before returning... thoughts? Seems alot less invasive > > than the filemap.c code dup'ing thing. > > Something like this (works OK for me)... Is this 2.6.16 material? > cheers. > Nathan >... cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed