From: Jaegeuk Kim Subject: Re: [PATCH v2] f2fs: introduce "strict_fsync" for posix standard fsync Date: Tue, 27 Feb 2018 20:49:07 -0800 Message-ID: <20180228044907.GA81737@jaegeuk-macbookpro.roam.corp.google.com> References: <20180202083333.104786-1-zhengjunling@huawei.com> <20180210004457.GA1885@jaegeuk-macbookpro.roam.corp.google.com> <20180212000718.GA44666@jaegeuk-macbookpro.roam.corp.google.com> <089d134b-914b-3bbe-507b-3d59ba018a4d@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eqtg5-001Fqg-9n for linux-f2fs-devel@lists.sourceforge.net; Wed, 28 Feb 2018 04:49:17 +0000 Received: from sfi-lb-mx.v20.lw.sourceforge.com ([172.30.20.201] helo=mail.kernel.org) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) id 1eqtg1-006lbf-KW for linux-f2fs-devel@lists.sourceforge.net; Wed, 28 Feb 2018 04:49:17 +0000 Content-Disposition: inline In-Reply-To: <089d134b-914b-3bbe-507b-3d59ba018a4d@huawei.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net On 02/13, Chao Yu wrote: > Hi Jaegeuk, > > On 2018/2/12 8:07, Jaegeuk Kim wrote: > > On 02/11, Junling Zheng wrote: > >> Hi, Jaegeuk > >> > >> On 2018/2/10 8:44, Jaegeuk Kim wrote: > >>> On 02/02, Junling Zheng wrote: > >>>> Commit "0a007b97aad6"(f2fs: recover directory operations by fsync) > >>>> fixed xfstest generic/342 case, but it also increased the written > >>>> data and caused the performance degradation. In most cases, there's > >>>> no need to do so heavily fsync actually. > >>>> > >>>> So we introduce a new mount option "strict_fsync" to control the > >>>> policy of fsync. It's set by default, and means that fsync follows > >>>> POSIX semantics. And "nostrict_fsync" means that the behaviour is > >>>> in line with xfs, ext4 and btrfs, where generic/342 will pass. > >>> > >>> How about adding "fsync=%s" to give another chance for fsync policies? > > Agreed. > > >>> > >> > >> OK, I'll give patch v3 to change to "fsync=%s" format. > >> BTW, which policy do u think should be the default behavior for f2fs? Posix > >> or ext4? > > > > The default should be like ext4 as fsync=strict. We may add fsync=posix for > > this. > > I'd like to suggest using fsync=posix option by default, because in most popular > in-used scenario of f2fs: android, all users of filesystem are posix-compliant, > so there is no such requirement that fs needs do more than posix as generic/342 > restricted. > > The performance of fsync=strict mode regressed as expected, so if we enable > fsync=strict mode by default, I suspect it may make f2fs losing some kinds of > benchmark competition. > > How do you think? Okay, I have no objection on that. Thanks, > > Thanks, > > > > > Thanks, > > > >> > >> Thanks > >> Junling > >> > >>> Thanks, > >>> > >>>> > >>>> Signed-off-by: Junling Zheng > >>>> Reviewed-by: Chao Yu > >>>> --- > >>>> Documentation/filesystems/f2fs.txt | 4 ++++ > >>>> fs/f2fs/dir.c | 3 ++- > >>>> fs/f2fs/f2fs.h | 1 + > >>>> fs/f2fs/file.c | 3 ++- > >>>> fs/f2fs/namei.c | 9 ++++++--- > >>>> fs/f2fs/super.c | 13 +++++++++++++ > >>>> 6 files changed, 28 insertions(+), 5 deletions(-) > >>>> > > > > . > > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot