From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [2002:c35c:fd02::1] (helo=ZenIV.linux.org.uk) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1KOrUT-0007mm-3S for linux-mtd@lists.infradead.org; Fri, 01 Aug 2008 10:04:05 +0000 Date: Fri, 1 Aug 2008 11:03:59 +0100 From: Al Viro To: Neil Brown Subject: Re: [RFC] Reinstate NFS exportability for JFFS2. Message-ID: <20080801100359.GM28946@ZenIV.linux.org.uk> References: <1209670979.25560.587.camel@pmac.infradead.org> <20080501204820.GA5951@infradead.org> <1209681898.25560.613.camel@pmac.infradead.org> <18458.28833.539314.455215@notabene.brown> <1217541264.1126.15.camel@shinybook.infradead.org> <18578.21997.529551.676627@notabene.brown> <1217551230.3719.15.camel@shinybook.infradead.org> <18578.29049.38904.746701@notabene.brown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18578.29049.38904.746701@notabene.brown> Sender: Al Viro Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, David Woodhouse , linux-mtd@lists.infradead.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, Aug 01, 2008 at 12:14:17PM +1000, Neil Brown wrote: > It sounds to me like the core problem here is that the locking regime > imposed by the VFS simply isn't suitable for JFFS2 .. and a bunch of > other filesystems. > > This seems to suggest that the VFS should be changed. > Superficially, it seems that changing the locking rules so that the > callee takes i_mutex rather than the caller taking it would help and, > in the case of JFFS2, make f->sem redundant. Does that match your > understanding? Huh? How could that possibly help? You are not changing the sequence of operations on locks, you only slightly modify the timing; how could that possibly eliminate a deadlock? Moreover, how the _hell_ could making exclusion area smaller make f->sem redundant?