From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 2/2] AFFS: wait for sb synchronization when needed Date: Fri, 11 Jun 2010 12:31:51 -0400 Message-ID: <20100611163151.GE24707@infradead.org> References: <1276268720-7398-1-git-send-email-dedekind1@gmail.com> <1276268720-7398-3-git-send-email-dedekind1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Al Viro , LKML , linux-fsdevel@vger.kernel.org To: Artem Bityutskiy Return-path: Content-Disposition: inline In-Reply-To: <1276268720-7398-3-git-send-email-dedekind1@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Jun 11, 2010 at 06:05:20PM +0300, Artem Bityutskiy wrote: > From: Artem Bityutskiy > > AFFS does not ever wait for superblock synchronization in > ->put_super(), ->write_super, and ->sync_fs(). > > However, it should wait for synchronization in ->put_super() because > it is about to be unmounted, in ->write_super() because this is > periodic SB synchronization performed from a separate kernel thread, > and in ->sync_fs() it should respect the 'wait' flag. This patch fixes > the situation. > > Also, in ->put_super(), do not write the SB if it is not dirty. ->sync_fs should also wait for the superblock I/O to be completed.