From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [HACK] fs/super.c: sync ro remount after blocking writers Date: Mon, 3 Feb 2014 02:23:03 -0800 Message-ID: <20140203102303.GB11829@infradead.org> References: <1391095614-21554-1-git-send-email-andrew.ruder@elecsyscorp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org, Artem Bityutskiy , Christoph Hellwig , Alexander Viro , Richard Weinberger To: Andrew Ruder Return-path: Received: from bombadil.infradead.org ([198.137.202.9]:35627 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751903AbaBCKXH (ORCPT ); Mon, 3 Feb 2014 05:23:07 -0500 Content-Disposition: inline In-Reply-To: <1391095614-21554-1-git-send-email-andrew.ruder@elecsyscorp.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Jan 30, 2014 at 09:26:54AM -0600, Andrew Ruder wrote: > Move sync_filesystem() after sb_prepare_remount_readonly(). If writers > sneak in anywhere from sync_filesystem() to sb_prepare_remount_readonly() > it can cause inodes to be dirtied and writeback to occur well after > sys_mount() has completely successfully. > > This was spotted by corrupted ubifs filesystems on reboot, but appears > that it can cause issues with any filesystem using writeback. >>From the link that Richard posted it seems like you have a testcase. Can you please integrate it into xfstests so that we can properly regression test for this issue from now on?