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.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 BAB7CEB64DD for ; Wed, 26 Jul 2023 01:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ozlabs.org; s=201707; t=1690335593; bh=g4+spZWgq0eS9irqfihzysgfAABYfYXXmt6SNBBeIWA=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=fn8IRdYT/GQFANcOZoa1QQTZVbZsQL0jc3f7zOrdA5rssKhcZZDRpryaetrcz9v/h ZemGUv4GiJ+lUwQcDr5fW7bP6LcD93U9h2POW8dHDQvE2GQYeHKMgHAC7v44orr01e KLBJJfrvpQqASCH1lJKUDd76heKpYIauuz6Fm4t6PUg66rCM9e/2emLt74t8+zsoh/ hB0CVCnNoMCzX05uc9NvxDbFaMDL/UmDeb2tIeEIEjazRn2DC57mrfDJMPSjKfC0ZG s1GtfEOgfqsy0BlCZTePZwcXFmZOOADBVVJUigRoOKGbyVwP6HVBAOyFrpWcaAQyCQ 0YOX5IgelWh2w== Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4R9c5j6PVMz30gJ for ; Wed, 26 Jul 2023 11:39:53 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20221208 header.b=MZxYT2Md; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=google.com (client-ip=2607:f8b0:4864:20::1132; helo=mail-yw1-x1132.google.com; envelope-from=hughd@google.com; receiver=lists.ozlabs.org) Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4R9c5Z4fWtz2yTv for ; Wed, 26 Jul 2023 11:39:45 +1000 (AEST) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-583b3aa4f41so47257877b3.2 for ; Tue, 25 Jul 2023 18:39:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690335578; x=1690940378; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=g4+spZWgq0eS9irqfihzysgfAABYfYXXmt6SNBBeIWA=; b=b0YaCBmLdWhDCDBTzZ+qNs84s8sUqLXIwkAxDWro6OhdBb8YZJBkZkNmcfezOogFeV 710VMZqmLlkzdUA8Uuk7JUfMg6eAEdPvoVeZjIKKd0RaqtTVGZXVjubZkA0F2AHs6/bd sZWWJ6boQGJth2i2Ua65u1sn33hwUUBQI13NuO6WmkpgxeyRI0y1vrcPxPP3IePoyLht Mtm/1k53tsqsgiiCh5dzE1huVq2uVTuSJQH6Z5kkQj2KiVG8z2D/6VmKTiXr1wNICa5b 9GCNOOD2Ug2mTUpvlJcZiCu+2EQACujYS1WFaTrZaA/2CyrJQ94enGyvsra+TueHLIbQ 5a0w== X-Gm-Message-State: ABy/qLbQl/yZSg4TrCYvcg/vD+7VmaqPRAxNUYyf3U4/SqscGfDnHu8B md7mrBxkcUI5mSa/eOMNQN625A== X-Google-Smtp-Source: APBJJlHxqCs0/k9opPHZr1oFjC/IjLn2NWFjtEyuaFY5bDdVyDOg3sTAz2vkUnxY9z5liUX1UEynKA== X-Received: by 2002:a81:46c3:0:b0:56d:2189:d87a with SMTP id t186-20020a8146c3000000b0056d2189d87amr821699ywa.15.1690335578030; Tue, 25 Jul 2023 18:39:38 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id s10-20020a5b044a000000b00c654cc439fesm3165326ybp.52.2023.07.25.18.39.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 18:39:37 -0700 (PDT) Date: Tue, 25 Jul 2023 18:39:25 -0700 (PDT) X-X-Sender: hugh@ripple.attlocal.net To: Jeff Layton Subject: Re: [PATCH v6 3/7] tmpfs: bump the mtime/ctime/iversion when page becomes writeable In-Reply-To: <20230725-mgctime-v6-3-a794c2b7abca@kernel.org> Message-ID: <42c5bbe-a7a4-3546-e898-3f33bd71b062@google.com> References: <20230725-mgctime-v6-0-a794c2b7abca@kernel.org> <20230725-mgctime-v6-3-a794c2b7abca@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Hugh Dickins via Linux-erofs Reply-To: Hugh Dickins 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 , Hugh Dickins , 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 , 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.de v, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org, Ronnie Sahlberg , Steve French , Sergey Senozhatsky , Luis Chamberlain , 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 Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" 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 > > 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