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 us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 C8137C83F12 for ; Tue, 29 Aug 2023 22:59:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693349954; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=/IyI8ii6BrUynwmVcI1iprtPkbpDnPXxoAG6ELBpQco=; b=bnHe4I//0ZxoTbLpdbhjDx4FXOj1/zDLbH4DMv7Sd5HVqMUc9Sz/dAbEenRQeh5OGBEJJl 9f7j5TRpfRhrfC+J7dprFIFm8NIZuSOnUOLVX4ALmpTF+CbQgL+GB1S7UbbDivOGMCQ2J0 30N/2OW5wC3t0fU3p84eOQrK10Vdzhk= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-35-3D56C_1uPsGMQupLbvBJrw-1; Tue, 29 Aug 2023 18:59:05 -0400 X-MC-Unique: 3D56C_1uPsGMQupLbvBJrw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BFC76280D212; Tue, 29 Aug 2023 22:59:02 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A78B63F6C; Tue, 29 Aug 2023 22:59:02 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2E29219465A2; Tue, 29 Aug 2023 22:59:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7DA5D1946594 for ; Tue, 29 Aug 2023 22:59:01 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id F170D2026D68; Tue, 29 Aug 2023 22:59:00 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E91EE2026D4B for ; Tue, 29 Aug 2023 22:59:00 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BBF8980027F for ; Tue, 29 Aug 2023 22:59:00 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-591-uoa76RSQM_GsZp_epCJv8Q-1; Tue, 29 Aug 2023 18:58:57 -0400 X-MC-Unique: uoa76RSQM_GsZp_epCJv8Q-1 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 C592563D06; Tue, 29 Aug 2023 22:58:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9FABC433C7; Tue, 29 Aug 2023 22:58:48 +0000 (UTC) Message-ID: From: Jeff Layton To: Al Viro Date: Tue, 29 Aug 2023 18:58:47 -0400 In-Reply-To: <20230829224454.GA461907@ZenIV> References: <20230725-mgctime-v6-0-a794c2b7abca@kernel.org> <20230725-mgctime-v6-1-a794c2b7abca@kernel.org> <20230829224454.GA461907@ZenIV> User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Subject: Re: [Cluster-devel] [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr X-BeenThere: cluster-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: "\[Cluster devel\]" 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 , 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 , Chao Yu , Josef Bacik , Tom Talpey , Tejun Heo , Yue Hu , Joel Becker , 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 , linux-fsdevel@vger.kernel.org, Andrew Morton , Sungjong Seo , linux-erofs@lists.ozlabs.org, linux-nfs@vger.kernel.org, linux-btrfs@vger.kernel.org Errors-To: cluster-devel-bounces@redhat.com Sender: "Cluster-devel" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: kernel.org Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable On Tue, 2023-08-29 at 23:44 +0100, Al Viro wrote: > On Tue, Jul 25, 2023 at 10:58:14AM -0400, Jeff Layton wrote: > > generic_fillattr just fills in the entire stat struct indiscriminately > > today, copying data from the inode. There is at least one attribute > > (STATX_CHANGE_COOKIE) that can have side effects when it is reported, > > and we're looking at adding more with the addition of multigrain > > timestamps. > >=20 > > Add a request_mask argument to generic_fillattr and have most callers > > just pass in the value that is passed to getattr. Have other callers > > (e.g. ksmbd) just pass in STATX_BASIC_STATS. Also move the setting of > > STATX_CHANGE_COOKIE into generic_fillattr. >=20 > Out of curiosity - how much PITA would it be to put request_mask into > kstat? Set it in vfs_getattr_nosec() (and those get_file_..._info() > on smbd side) and don't bother with that kind of propagation boilerplate > - just have generic_fillattr() pick it there... >=20 > Reduces the patchset size quite a bit... It could be done. To do that right, I think we'd want to drop request_mask from the ->getattr prototype as well and just have everything use the mask in the kstat. I don't think it'd reduce the size of the patchset in any meaningful way, but it might make for a more sensible API over the long haul. --=20 Jeff Layton