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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E703CC83F12 for ; Wed, 30 Aug 2023 00:43:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 018078E002E; Tue, 29 Aug 2023 20:43:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F09F58E000B; Tue, 29 Aug 2023 20:43:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D83CE8E002E; Tue, 29 Aug 2023 20:43:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id C428E8E000B for ; Tue, 29 Aug 2023 20:43:43 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 9E43B1A0359 for ; Wed, 30 Aug 2023 00:43:43 +0000 (UTC) X-FDA: 81178923126.14.67008D0 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf16.hostedemail.com (Postfix) with ESMTP id D5405180008 for ; Wed, 30 Aug 2023 00:43:41 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=IsIDlNRf; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf16.hostedemail.com: domain of jlayton@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=jlayton@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1693356222; h=from:from: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:dkim-signature; bh=TJIewxi47g+K6CQX2ZiNiF3NDELxcqhbiIMvx3Sf4xc=; b=JyWqUemwtzyUs1xYrWzZt2e3uteRHWIq97+9CMjyZt9k/IcGVZgD6aELATCRROIdRCP8u0 VgC3/okI64nt6jek9xObJMY0QkBDloI4tHm1lYaQgho9FnDC4LXWiBkUsq76zoFgNqSKGC 5sneMY9I/wYTz+mAQkQAdUJQtBScmdY= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=IsIDlNRf; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf16.hostedemail.com: domain of jlayton@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=jlayton@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1693356222; a=rsa-sha256; cv=none; b=toUnQ0NH9mVbsWY+O6nU4cqgXxj6FTVbO2roxSfKXvvfCQPx3xGeZ+H9TIu+2WUsm39bwt 5GliEDcHIpMkJ9Q2UlmqqXtRr5gcK5jtwEUOLNC86vrEMyu53VXai8uS64Sajx2cBWVzJi nSYtyHDOQyxJ2NCKSAK/dvHz9r5/XO0= 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 2110C61BB9; Wed, 30 Aug 2023 00:43:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72A58C433CC; Wed, 30 Aug 2023 00:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693356218; bh=LyIf2T4m7Z+aGoOTC20QhjEHya5KDco7uKHcToK2QN0=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=IsIDlNRfFegBQz5apXf9Q9gjAuC8RqtGng+nYfYjX0S5SJxWLKbkP/MogQRo+SLWh 08nrxChiobBJGOdvi1cvZ9Cxb2Pii/+6mcjLXiRCfGelk5Fzb7nFOM5cN1DYFxC+lb K0+wyy4lvPV7hwkO6kEPEPBXJN5ToQ7LqZEmRRmYaASuIjGr2KolOsqcxXfv9z9AFT U+YvwKGFpKZQuYKrSPBrKqS32L3Y2d5AV2LqhVdm8HiFMosr5io8ASM2xgBUjx2M+9 p73bg3Y2GD+ffVCVZHTAzgHK5yijHsVB4GOG1GW7sSKXaED0tZT4jOsD9cxCZCytpG axe3lD1uk8SPA== Message-ID: <1005e30582138e203a99f49564e2ef244b8d56aa.camel@kernel.org> Subject: Re: [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr From: Jeff Layton To: Al Viro Cc: Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Howells , Marc Dionne , Chris Mason , Josef Bacik , David Sterba , Xiubo Li , Ilya Dryomov , Jan Harkes , coda@cs.cmu.edu, Tyler Hicks , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Namjae Jeon , Sungjong Seo , Jan Kara , Theodore Ts'o , Andreas Dilger , Jaegeuk Kim , OGAWA Hirofumi , Miklos Szeredi , Bob Peterson , Andreas Gruenbacher , Greg Kroah-Hartman , Tejun Heo , Christian Brauner , Trond Myklebust , Anna Schumaker , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Mike Marshall , Martin Brandenburg , Luis Chamberlain , Kees Cook , Iurii Zaikin , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Sergey Senozhatsky , Richard Weinberger , Hans de Goede , Hugh Dickins , Andrew Morton , "Darrick J. Wong" , Dave Chinner , Anthony Iliopoulos , v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, linux-afs@lists.infradead.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@coda.cs.cmu.edu, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, devel@lists.orangefs.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-mtd@lists.infradead.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org Date: Tue, 29 Aug 2023 20:43:31 -0400 In-Reply-To: <20230830000221.GB3390869@ZenIV> References: <20230725-mgctime-v6-0-a794c2b7abca@kernel.org> <20230725-mgctime-v6-1-a794c2b7abca@kernel.org> <20230829224454.GA461907@ZenIV> <20230830000221.GB3390869@ZenIV> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Rspamd-Queue-Id: D5405180008 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: nufheauiogr6fn7kuddu4b6a8gs8eom4 X-HE-Tag: 1693356221-845770 X-HE-Meta: U2FsdGVkX18xzpJ8XGlaoaCo+3VyM5TLTs0e1GhQiSC+9Is0cI51Ik1EidQY8ymh3nKMoCBfhqa3/ZP4Wg8NA2trW4E8FDkhHuLC9xqevJo7AK4hiQiJ5jRSlF/GyHPC3WvCoKM29je25hjEMINFhV7iOGiUxdOdU7ddif+3CPXP5XlS5wpROfhhvFhE9dHz6D/TDQhdYyzf3sbLVSXHP+0gsZ8rw4Seoe2e5YMNZfuOzGulQYtigGWQmdVsEVUiX/wFaCg/qTH224mIdHE+Q6m5Vigxi6a4s/qsCxZ9WsJmY7W3nljNmda9csHBLL/2cQ7h8+SwCbkvp4LSWx68YCWtK8sDfDqyyi/cOMJkgh8pfvu4zBVn3DXb8If6AibBbc81mcRYKUstILXkQez3Nr8PvMdEiSQJbKezBBNDakpaLZwiSSkcZjvIFA2/4VjUpst+vr1adVtVeTrr73RQ8myPBH+KZE1rUxf+wk2bUdVTiQYudIXhHKPoZ/jtilLD+aU/xn7XLHH8rbs3kzLaU70oztoF1orJihkoBe4D3xV9hS/Su2Kkac+kCANOiueTfNcbd4/o48yXRawwlT2tJgaTeg3MfXwCH3RWZlHsIlunMg8R9ju/LpS+oWBcp8ySxVoqSqrbDxA42DiszfKC0xhg01DLoGu5Gra7mezh3z1yyqGkmUixCPTz1WiEMq+5864UQVpRGo9AeF1XKO3yGMVPQedslet9VojzTYk7dZDCDwW4QgDDucePSanxjvTs+OHQPCeEcOGTySn3Ax7Z7q47AvwB+jLhQROznWhJ/hzNNWtwHdEZazCbZltuxzF3rX+TkrxqKiZ+aUr3T5IvOIUGFRnIZ5PIWJI5IcjgeBZwLs0c8y3xWiYSwIobQZ5mOR0RQiGQDXozmx2wcw2roJzh5dWbrH/vQh8nrWRLlNkDc3X/SxBnsO6VCooA7i5HN/nEGdL7TPjSOt1ndMt S0HEcOEf sX2y+GaAUB7KDwBrXR1STwJcsQT0/gh6em2kUpMVHmI7NmeU/CtydZmx4bn/vjFGTzw/bXwufAI9If6P8KNsPqNZy2C3+kvV+NeSHymzOU2Wcjq7hhm+Zu3a2qihs+U+lwkFmLYJL1ADnA7BhwUT9ll+lOaI8WVNtaUfrCgAwh1GRgoFNGpeThIdUGMw5upw+eqfkspcH8cbK/35HCiQL1Y9Iq8ENyoMLTUmRhRA7U84hnX9oZCgdSj1gzqh9wLx4i/8BT2LUr76SHcxonT6nXWAHgS7C70WDG7NQw/R86n9hPi3r1OfORa0AneHJieZ0ROyxvJoluLQWBqqHsUpRc8JOWthmlXaH/+GVSmK1FKYqspDHKoeJb/hBB/jnkf+6Wpr0tCmgQOGF1pw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 2023-08-30 at 01:02 +0100, Al Viro wrote: > On Tue, Aug 29, 2023 at 06:58:47PM -0400, Jeff Layton wrote: > > 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 indiscriminat= ely > > > > today, copying data from the inode. There is at least one attribute > > > > (STATX_CHANGE_COOKIE) that can have side effects when it is reporte= d, > > > > 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 calle= rs > > > > just pass in the value that is passed to getattr. Have other caller= s > > > > (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 boilerpl= ate > > > - just have generic_fillattr() pick it there... > > >=20 > > > Reduces the patchset size quite a bit... > >=20 > > 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. > >=20 > > 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 > ->getattr() prototype change would be decoupled from that - for your > patchset you'd only need the field addition + setting in vfs_getattr_nose= c() > (and possibly in ksmbd), with the remainders of both series being > independent from each other. >=20 > What I suggest is >=20 > branchpoint -> field addition (trivial commit) -> argument removal > | > V > your series, starting with "use stat->request_mask in generic_fillattr()" >=20 > Total size would be about the same, but it would be easier to follow > the less trivial part of that. Nothing in your branch downstream of > that touches any ->getattr() instances, so it should have no > conflicts with the argument removal side of things. The only problem with this plan is that Linus has already merged this. I've no issue with adding the request_mask to the kstat and removing it as a separate parameter elsewhere, but I think we'll need to do it on top of what's already been merged. --=20 Jeff Layton