From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [PATCH 2/2] AFFS: wait for sb synchronization when needed Date: Sat, 12 Jun 2010 04:09:45 +0300 Message-ID: <1276304985.17909.15.camel@localhost.localdomain> References: <1276268720-7398-1-git-send-email-dedekind1@gmail.com> <1276268720-7398-3-git-send-email-dedekind1@gmail.com> <20100611163151.GE24707@infradead.org> Reply-To: dedekind1@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Al Viro , LKML , linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: In-Reply-To: <20100611163151.GE24707@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, 2010-06-11 at 12:31 -0400, Christoph Hellwig wrote: > On Fri, Jun 11, 2010 at 06:05:20PM +0300, Artem Bityutskiy wrote: > > From: Artem Bityutskiy > >=20 > > AFFS does not ever wait for superblock synchronization in > > ->put_super(), ->write_super, and ->sync_fs(). > >=20 > > However, it should wait for synchronization in ->put_super() becaus= e > > 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 fi= xes > > the situation. > >=20 > > Also, in ->put_super(), do not write the SB if it is not dirty. >=20 > ->sync_fs should also wait for the superblock I/O to be completed. Err, depending on the 'wait' flag? I did: @@ -74,7 +76,7 @@ static int affs_sync_fs(struct super_block *sb, int wait) { lock_super(sb); - affs_commit_super(sb, 2); + affs_commit_super(sb, wait, 2); sb->s_dirt =3D 0; unlock_super(sb); return 0; --=20 Best Regards, Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E= =D1=86=D0=BA=D0=B8=D0=B9)