From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90337C4167B for ; Tue, 28 Nov 2023 02:42:56 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1r7o3r-0001ON-Mg; Tue, 28 Nov 2023 02:42:55 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1r7o3r-0001OH-4h for linux-f2fs-devel@lists.sourceforge.net; Tue, 28 Nov 2023 02:42:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=M+OVn7rG6wjg/6KeWB7jvUo6rUubdlR1FVOIkS+IaH8=; b=gmVUBUaN71W5Rgj1BWXjnSOlrC QOgl24L2eYHzqyjSBz3wUtIB9TfmX/8Xmuf7G76Io5keemmwyOTUmo6wbYgYpJtzEnUgyMMKXxzW0 vTtt1ELrP3aHYHX0w3ZMGRIoycIwY+dW9X6+GfoRH8QJebj3QdVdb4GSPzpvuRafyvyU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=M+OVn7rG6wjg/6KeWB7jvUo6rUubdlR1FVOIkS+IaH8=; b=U4zcT09FFzuTjUf6ha3zv1FUEA G4Upj/rft4E7RoAFLwnCtGuvkPklUWE4/29Tpuy4+Iit6JB48kckLmJe+29egaPI/YVib/gF5Bv2Y PLz0n/A20L1QXQFl6QV8kzJiWmCe/yjeZsST2huHjrF4apb2TqcyXYuw8H/jkHIC0ysE=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1r7o3i-00081s-E3 for linux-f2fs-devel@lists.sourceforge.net; Tue, 28 Nov 2023 02:42:54 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 06D4861518; Tue, 28 Nov 2023 02:42:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D72DC433C8; Tue, 28 Nov 2023 02:42:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701139355; bh=2dvgtHHX3mS1iRK8Z6Pf8GW437Nns93TnuD/Y1DQVW8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VIhrBaLpqmLcDjVkkPKkX8uNUl5Gt5g1ZFcbeTH9mU/L1qlDNttqRFiFI+H0dpLS2 zWTVQbv42GLLEkEShGP1u6nxjocAPGvXTmjLnTx0YVvvFPU+Z8mInF+IthuKBAKI55 9Gh4irLY8uNY2iJJpKF8kkdeha+1Smh67pIFVs2a2Q7LW+xgMp354UhYHBw+JLxMbe 1DmH6FSDD3/wQEznc2F/r9sdfTJxOo7+obaDQxMgtQTKWSq3dJaYwF/Z5tRYpHHIII 5XihRSyWDtHZVbZjwOjqHwHCLhQI3GDXDyMTwFTIUJLfvYEEcJjNciMU68icwzJh6j /sbjhEF2sI7RQ== Message-ID: Date: Tue, 28 Nov 2023 10:42:31 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US To: Yangtao Li , Jaegeuk Kim References: <20231120095410.3604801-1-frank.li@vivo.com> From: Chao Yu In-Reply-To: <20231120095410.3604801-1-frank.li@vivo.com> X-Headers-End: 1r7o3i-00081s-E3 Subject: Re: [f2fs-dev] [PATCH] f2fs: add support for an i_version counter X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 2023/11/20 17:54, Yangtao Li wrote: > NFSv4 mandates a change attribute to avoid problems with timestamp > granularity, which Linux implements using the i_version counter. This is > particularly important when the underlying filesystem is fast. > > Signed-off-by: Yangtao Li > --- > fs/f2fs/f2fs.h | 1 + > fs/f2fs/inode.c | 1 + > fs/f2fs/super.c | 1 + > 3 files changed, 3 insertions(+) > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index 9043cedfa12b..68fd2ef35104 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -28,6 +28,7 @@ > > #include > #include > +#include > > struct pagevec; > > diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c > index 560bfcad1af2..2604fa4a0704 100644 > --- a/fs/f2fs/inode.c > +++ b/fs/f2fs/inode.c > @@ -32,6 +32,7 @@ void f2fs_mark_inode_dirty_sync(struct inode *inode, bool sync) > if (f2fs_inode_dirtied(inode, sync)) > return; > > + inode_inc_iversion(inode); For the case f2fs is not used by nfs as backend storage, there will be overhead for iversion update logic. So what about introducing a new mount option to enable the iversion functionality, and disabling it by default? Thanks, > mark_inode_dirty_sync(inode); > } > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > index 033af907c3b1..2bddccd47e3a 100644 > --- a/fs/f2fs/super.c > +++ b/fs/f2fs/super.c > @@ -2204,6 +2204,7 @@ static void default_options(struct f2fs_sb_info *sbi, bool remount) > set_opt(sbi, MERGE_CHECKPOINT); > F2FS_OPTION(sbi).unusable_cap = 0; > sbi->sb->s_flags |= SB_LAZYTIME; > + sbi->sb->s_flags |= SB_I_VERSION; > if (!f2fs_is_readonly(sbi)) > set_opt(sbi, FLUSH_MERGE); > if (f2fs_sb_has_blkzoned(sbi)) _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel