From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 2/2] ->write_super lock_super pushdown Date: Wed, 6 May 2009 23:38:15 +0100 Message-ID: <20090506223815.GZ8633@ZenIV.linux.org.uk> References: <20090506201631.GB19043@lst.de> <20090506203618.GA20037@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:57902 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757614AbZEFWiO (ORCPT ); Wed, 6 May 2009 18:38:14 -0400 Content-Disposition: inline In-Reply-To: <20090506203618.GA20037@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, May 06, 2009 at 10:36:18PM +0200, Christoph Hellwig wrote: > On Wed, May 06, 2009 at 10:16:31PM +0200, Christoph Hellwig wrote: > > Only four filesystems have both a ->write_super method and use lock_super > > internally: ext4, fat, sysv, ufs. Push down lock_super into these > > filesystems and remove it from the caller. Add a get_fs_excl/put_fs_excl > > pair to sync_super for now to keep the current behaviour in that > > respect. Calling it a second time from write_super is fine as it's > > only checked for beeing non-zero. > > > > > > Signed-off-by: Christoph Hellwig > > Actually the patch lost two hunks due to missing quilt adds. Here's the > complete one: That's wrong. Even if fs does *not* use lock_super(), you can't get rid of it in ->write_super(). The thing is, right now calls of foo_write_super() are serialized by s_lock. For all filesystems that have ->write_super(), whether they use s_lock elsewhere or not. Lose lock_super() in the caller and you'll need some replacement in the method. IOW, you are missing * affs * bfs * exofs * ext2 * hfs * hfsplus * jffs2 * nilfs2 * reiserfs * xfs in the list. Some of those might be fine with several calls of ->write_super() in parallel, but that needs per-fs review for all of those. NAK in the current form.