From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933670Ab0J0PUg (ORCPT ); Wed, 27 Oct 2010 11:20:36 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:39622 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933342Ab0J0PUc (ORCPT ); Wed, 27 Oct 2010 11:20:32 -0400 Date: Wed, 27 Oct 2010 11:19:59 -0400 From: Christoph Hellwig To: "J. Bruce Fields" Cc: Christoph Hellwig , Arnd Bergmann , Linus Torvalds , Bryan Schumaker , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: nfsd changes for 2.6.37 Message-ID: <20101027151959.GA17370@infradead.org> References: <20101026164549.GD19445@fieldses.org> <20101027083924.GA28129@infradead.org> <20101027133924.GB6328@fieldses.org> <201010271546.09036.arnd@arndb.de> <20101027145538.GC6328@fieldses.org> <20101027145929.GA5788@infradead.org> <20101027151645.GD6328@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101027151645.GD6328@fieldses.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 27, 2010 at 11:16:46AM -0400, J. Bruce Fields wrote: > On Wed, Oct 27, 2010 at 10:59:29AM -0400, Christoph Hellwig wrote: > > On Wed, Oct 27, 2010 at 10:55:39AM -0400, J. Bruce Fields wrote: > > > Hm, two problems: > > > - We introduce the possibility of fcntl(fd, F_SETLEASE, F_UNLCK) > > > failing with ENOMEM. > > > > splitt ->setlease into ->add_least and ->delete_lease. No need to pass > > in a structure for the later. No need to return one either. > > Sounds fine to me. > > > > > > - fasync_helper(.,.,1,.) sleeps. Argh. > > > > That's not new.. > > So we could do > > unlock_flocks(); > error = fasync_helper(fd, filp, 1, &fl->fl_fasync); > lock_flocks(); > > and say, hey, we didn't introduce any new bug there. But.... > > I don't know, maybe add a version of fasync_add_entry() that takes a > preallocated fasync_struct?? Or just convert the lock to a sleeping mutex. Now that we have adaptive spinning the horrible behaviour that Willy saw years ago might not be that bad any more. That'll need some benchmarking, though.