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 1890EC001DE for ; Wed, 26 Jul 2023 10:26:43 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qObj5-0001sv-W0; Wed, 26 Jul 2023 10:26:40 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qObj4-0001so-2f for linux-f2fs-devel@lists.sourceforge.net; Wed, 26 Jul 2023 10:26:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=MIME-Version:Content-Transfer-Encoding:Content-Type :References:In-Reply-To:Date:Cc:To:From:Subject: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=8EFNvO/bG6mKtzRHuK9HaQjBAdPfXQelasnzw2LJW8I=; b=U8FmWVKaHj0qxgW7lo8MAhBGdo ig05OkEvnDzJYudnvIDKc40FImW7XGb1mvXZCMHd4wJ5vOwoGfLOPesdq1c5QD3zmOuoIGZpelXHx oLJGuFlwhQZu/eUSe/eb6QnXRLP7nruOmUIFNNeOwjsHf05WJKbXETKNsXQmJzm0PgL8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=MIME-Version:Content-Transfer-Encoding:Content-Type:References: In-Reply-To:Date:Cc:To:From:Subject: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=8EFNvO/bG6mKtzRHuK9HaQjBAdPfXQelasnzw2LJW8I=; b=RxiT7/+qrfXO6ct8A22gR7KV/V bUtWfnE57GEBBQzHRQGFAWWuaJJbcxSo6oH8TXhij4pcBqO7SlH8XyqwvJ5rJitFZR10Sc4W4aQd0 T7fEMGAiT9rpxVPIcWA5mMVeQP9JRds3zAtHTTpZwVKUHT5gx8CD0BuPGfvqIntdBjtA=; 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 1qObj3-0008Fx-At for linux-f2fs-devel@lists.sourceforge.net; Wed, 26 Jul 2023 10:26:38 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5AF2261A40; Wed, 26 Jul 2023 10:26:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DDF4C433C7; Wed, 26 Jul 2023 10:26:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690367190; bh=5KYTw7QzTyvtxBFV3dygoBH0PeFk0S7OnkeeUk9b43Y=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=ndKso9yUYsbZwpDHng42ep2CAfco3wLs2OV40nFjqGLYD9AEcWQWsW6ETt5eznwfc cv1pssJER1sswKXyNjOiTQENkKxQk0VK7z2g3ch3Yi2JD1b11x0Zkl0EFgKozkvsxy f1dZ8Uzp9NvZuR0ShQq2ncjDBcvWQLsdpHvv+hCoNZE8CswlcoELNBb87INDiV++T7 H3FxOmXTcDxptDoUUj0sqZ+IrTepfzb2qKKeU0koRPwfU0de4m8txUllhzV58rHcVD p+AU8vMVOdefcjxtH+iRA3W4CG6/XXiQ3a2jG5SNH585qxa35MBMZ5O8U7Wt7Y0BFJ 4GDCTXheHD02g== Message-ID: <9b3292b65d3c63c50e671c47ed90304c4a8d1af9.camel@kernel.org> From: Jeff Layton To: Hugh Dickins Date: Wed, 26 Jul 2023 06:26:23 -0400 In-Reply-To: <42c5bbe-a7a4-3546-e898-3f33bd71b062@google.com> References: <20230725-mgctime-v6-0-a794c2b7abca@kernel.org> <20230725-mgctime-v6-3-a794c2b7abca@kernel.org> <42c5bbe-a7a4-3546-e898-3f33bd71b062@google.com> User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Headers-End: 1qObj3-0008Fx-At Subject: Re: [f2fs-dev] [PATCH v6 3/7] tmpfs: bump the mtime/ctime/iversion when page becomes writeable 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: Latchesar Ionkov , Martin Brandenburg , Konstantin Komarov , linux-xfs@vger.kernel.org, "Darrick J. Wong" , Dominique Martinet , Christian Schoenebeck , Dave Chinner , David Howells , Chris Mason , Andreas Dilger , Hans de Goede , Marc Dionne , codalist@coda.cs.cmu.edu, linux-afs@lists.infradead.org, Mike Marshall , Paulo Alcantara , linux-cifs@vger.kernel.org, Eric Van Hensbergen , Andreas Gruenbacher , Miklos Szeredi , Richard Weinberger , Mark Fasheh , Tyler Hicks , cluster-devel@redhat.com, coda@cs.cmu.edu, linux-mm@kvack.org, linux-f2fs-devel@lists.sourceforge.net, Ilya Dryomov , Iurii Zaikin , Namjae Jeon , Trond Myklebust , Shyam Prasad N , ecryptfs@vger.kernel.org, Kees Cook , ocfs2-devel@lists.linux.dev, Anthony Iliopoulos , Josef Bacik , Tom Talpey , Tejun Heo , Yue Hu , Alexander Viro , linux-mtd@lists.infradead.org, David Sterba , Jaegeuk Kim , ceph-devel@vger.kernel.org, Xiubo Li , Gao Xiang , OGAWA Hirofumi , Jan Harkes , Christian Brauner , linux-ext4@vger.kernel.org, Theodore Ts'o , Joseph Qi , Greg Kroah-Hartman , v9fs@lists.linux.dev, ntfs3@lists.linux.dev, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org, Ronnie Sahlberg , Steve French , Sergey Senozhatsky , Luis Chamberlain , Jeffle Xu , devel@lists.orangefs.org, Anna Schumaker , Jan Kara , Bob Peterson , linux-fsdevel@vger.kernel.org, Andrew Morton , Sungjong Seo , linux-erofs@lists.ozlabs.org, linux-nfs@vger.kernel.org, linux-btrfs@vger.kernel.org, Joel Becker Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Tue, 2023-07-25 at 18:39 -0700, Hugh Dickins wrote: > On Tue, 25 Jul 2023, Jeff Layton wrote: > > > Most filesystems that use the pagecache will update the mtime, ctime, > > and change attribute when a page becomes writeable. Add a page_mkwrite > > operation for tmpfs and just use it to bump the mtime, ctime and change > > attribute. > > > > This fixes xfstest generic/080 on tmpfs. > > Huh. I didn't notice when this one crept into the multigrain series. > > I'm inclined to NAK this patch: at the very least, it does not belong > in the series, but should be discussed separately. > > Yes, tmpfs does not and never has used page_mkwrite, and gains some > performance advantage from that. Nobody has ever asked for this > change before, or not that I recall. > > Please drop it from the series: and if you feel strongly, or know > strong reasons why tmpfs suddenly needs to use page_mkwrite now, > please argue them separately. To pass generic/080 is not enough. > > Thanks, > Hugh > Dropped. This was just something I noticed while testing this series. It stood out since I was particularly watching for timestamp-related test failures. I don't feel terribly strongly about it. Thanks! > > > > Signed-off-by: Jeff Layton > > --- > > mm/shmem.c | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/mm/shmem.c b/mm/shmem.c > > index b154af49d2df..654d9a585820 100644 > > --- a/mm/shmem.c > > +++ b/mm/shmem.c > > @@ -2169,6 +2169,16 @@ static vm_fault_t shmem_fault(struct vm_fault *vmf) > > return ret; > > } > > > > +static vm_fault_t shmem_page_mkwrite(struct vm_fault *vmf) > > +{ > > + struct vm_area_struct *vma = vmf->vma; > > + struct inode *inode = file_inode(vma->vm_file); > > + > > + file_update_time(vma->vm_file); > > + inode_inc_iversion(inode); > > + return 0; > > +} > > + > > unsigned long shmem_get_unmapped_area(struct file *file, > > unsigned long uaddr, unsigned long len, > > unsigned long pgoff, unsigned long flags) > > @@ -4210,6 +4220,7 @@ static const struct super_operations shmem_ops = { > > > > static const struct vm_operations_struct shmem_vm_ops = { > > .fault = shmem_fault, > > + .page_mkwrite = shmem_page_mkwrite, > > .map_pages = filemap_map_pages, > > #ifdef CONFIG_NUMA > > .set_policy = shmem_set_policy, > > @@ -4219,6 +4230,7 @@ static const struct vm_operations_struct shmem_vm_ops = { > > > > static const struct vm_operations_struct shmem_anon_vm_ops = { > > .fault = shmem_fault, > > + .page_mkwrite = shmem_page_mkwrite, > > .map_pages = filemap_map_pages, > > #ifdef CONFIG_NUMA > > .set_policy = shmem_set_policy, > > > > -- > > 2.41.0 -- Jeff Layton _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel