From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796160154; b=5mdcZSdDq9cP69YTm1jnILj6EmIz+uTRv07rJm99aTiUqLVS9io+BQiuk/6TUCdr7zqB 5nKJw2I/O37qLJSwZerghwsjp5Hzb0aa9rQe5Kn76nb/4Mklt721V/LsWqp4Y4nU3Dt9d TkMy6Jive9+kLeVpkIVQSADRrxYjXXtD8iBzZA7NYruUjNm4FKrXshhyr3zKPmS3nIwbx QkEJF7GGY7B56yeuhKG66qtythP/I20h7U91+uAufeLAmeGXVJazadpMWGM3jrFI1HnQ5 rfFa4lAIJaGC69GE2LM/5KK80bSX8lPvWZs5wLIyNerpBizNPnYDOW/fZ7nOtDTJnWQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796160154; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To:X-Mailer: References:In-Reply-To; bh=wL8rR9xqigwIGgId5x+gQPT1UNb5ag0dt6v8xvarAtI=; b=H3Re6euscJ/iMpOeTxdC42mkHfF149f+HDOOTHFCe4wf/+P6cAMKTew2l3OQqy2zhYUk rbfPw0Jb8y+Bqq0nzFbVh5aCYG1/rh5unO6WfXGG+Henf6laDsI6HR1Iz/Ji93WjNHBy0 3OkRurTGr3rj5An8TALMuhpyPu6GoOueQdFYzveUNA/b1aGr1dQVBM6oXkh9wpn7uZLG+ lTjMUAkH335nyDeiU3ENlMeC4rUBrZDPvu2QgVjIOcDQVYnDwJs/u0L7Iz9Y0gzbSKwAX UVsE8tNGZ6X7oe4W5lN2MOGRRjUbOSp8/LoUMLcqIpXXdpRlkMpsFITAiDM8rOR2IFw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=sxjfmvCt; arc=none smtp.remote-ip=209.85.221.47 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 387F9606A6A4 for ; Tue, 1 Dec 2026 21:22:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 387F9606A6A4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=sxjfmvCt Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-4a34ffd3e39so6706906f8f.0 for ; Tue, 01 Dec 2026 13:22:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796160153; x=1796764953; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:mime-version:from:to:cc:subject:date:message-id :reply-to:content-type; bh=wL8rR9xqigwIGgId5x+gQPT1UNb5ag0dt6v8xvarAtI=; b=sxjfmvCtmC4iEILjwQQTfUZCsVtreyxsFh38CerFY4KyW2liYHRsbW1S1l4FlCYkFu 2qCrG6eGvy+jg9KAVpy05ngIMEUtGmF0inwjmqFs0O1ci5ud9swzk+XC3t2XgC8s5fy5 yoi6xPxr9gmOPmR4Y9i3+k7bA5OZPey/t/Pq01SROx5gqsr1pkx6cr247mmQHH6jIXh+ nfVdBA0DOk/NC4DlJHZ6Kw6i+ekZCPelRqYYX8Z0OzmjRCbiXFTb8999+fd4o1NcLlrK 4PJ6XDJsF2Gvw1lKscZkibOxJbEKEVmbM4w+xPmHR+6lOq7BhT+b4Kw5Ssi3CNhMV5Zq SvFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796160153; x=1796764953; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:mime-version:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=wL8rR9xqigwIGgId5x+gQPT1UNb5ag0dt6v8xvarAtI=; b=D742XtoInjLDEOEi0DBkKkB6geJnsDEz/+gJhKDCdHvcCOiKtaVs20Z7AWDpwUS3y8 1uM/HK78Ib46LJdW30samGjh4w1DTIPJJuiW+SH0Ob+NYipbSsFWe0EtgKK8seXlIrta qoFZ8MbC6ecK4N1M6dEdcA5F3rfzxftiwgSuJzRkaP4E60M6mK7r1pC1PI9Nxlha7mtY ofWbu4cr1fqhDNn09VNSWvkE50Dp6mEMp415r4wxRWuXxzotNdk9uq0GgEcZXipjJeJ6 sFL9uXKKKfMWeJpOL8nQP7SC3ntPExf5byhE8BGzoHRct0/2tXweFhUfWLRwBtB8TphI UVPg== X-Forwarded-Encrypted: i=1; AL+hErGMu/g4jFUKtMo36NADF7yszJchQ01KdwEozBrF2wjbKCQgg4CpXkUOzt9leSTCsK2i9Wm3Hz04SmQ=@vger.kernel.org X-Gm-Message-State: APuU4Z9n87iqzjvrJfeHWUt+OISFwgVlOfs/6qMSyg5YkQbNYtPIYGAl GYFGC6ggq8bTOLUOcXNfgshYNoP2MbujrFTFciXbc3TLzat6/9u1Psd1 X-Gm-Gg: AZFdTZcWd1sfdBz12rsPh9dcMb9fXHYGKaY07UdwXe7aZAZTj3250kdHEDKEDDqmQcF Fwt4XKGNi/hAdPzRIITSH71PG6pK0PKdtb+BGlJKVtBxaj7Sh2Fd+F9qSECdpm3QKrQrSe/8HYD mCH3Nxmgo0uRDh/UPFDGpEIodg2aoKO+9S6Is+j5KdZ31UMkz+vFNHRoWoZBfLTfWhsXSp9b+jd 99/9cnjPxUW5Vu+dNMdrU6lIvsxcg6038IsjbXpRcySXA7fPuT3x5fYIOU47M0wDed2W1B7EuE+ G99WhUqSWRH01PcMC6/A+xPkikWy1PzKZnUv4+Xa1crzFq5mzKJCv4Lc3pIP9jYBj8yKqT75sfs BAl7XlXyCs6FqQ76yvdb8oR+8olt6HOIHSxNcTwtHRfGUWjKtY2Nd0Q89j4cmjsWU6m/dLX1Uqc vzZv3Mt40OVd5TBJ2UeYIjrLqAkRzSV7ZW3d6/h3ybiyqedcMoJkG/wh0BC/d1gNes5nnfXDQ8+ urX6RBgMWB4yjQTcP3c6+V+gC5dGzTFCyrPPWOoU60SAOZTk7VLBuqURgVcfW5cm7m9zVB4xaDK rQwSXCQThQ4FpA9usim4f2wmCA== X-Received: by 2002:a05:6000:2501:b0:4ac:4592:19ab with SMTP id ffacd0b85a97d-4ac45921a1cmr70287766f8f.18.1796160152326; Tue, 01 Dec 2026 13:22:32 -0800 (PST) Received: from localhost ([2001:b07:5d26:7a6a:365a:60ff:fe0d:cfc6]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab658e2c8csm74057335f8f.2.2026.12.01.13.22.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Dec 2026 13:22:31 -0800 (PST) X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Content-Type: multipart/signed; boundary=a6e1a6523bdf7a6e2ec77ce4cfab5b9870610f2bb66618f0b9e2adfebe5a; micalg=pgp-sha512; protocol="application/pgp-signature" Date: Tue, 01 Dec 2026 22:22:27 +0100 Message-Id: Cc: "Namjae Jeon" , "Hyunchul Lee" , "Jonathan Corbet" , "Eric Biggers" , "Theodore Y . Ts'o" , "Jaegeuk Kim" , "Alexander Viro" , "Christian Brauner" , "Shuah Khan" , "Randy Dunlap" , "Chuck Lever" , "Jeff Layton" , "Jan Kara" , "Alexander Aring" , "Darrick J . Wong" , "Andrey Albershteyn" , "Miklos Szeredi" , =?utf-8?q?Pali_Roh=C3=A1r?= , "Lauri Gates" , "Christoph Hellwig" , "Dave Chinner" , , , , , , , , , Subject: Re: [PATCH v3 2/5] vfs: add xflags masks to fileattr API From: "koraynilay" To: "Amir Goldstein" , "koraynilay" X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261129024233.2361718-1-koray.fra@gmail.com> <20261129024233.2361718-3-koray.fra@gmail.com> In-Reply-To: --a6e1a6523bdf7a6e2ec77ce4cfab5b9870610f2bb66618f0b9e2adfebe5a Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Tue Dec 1, 2026 at 9:22 PM CET, Amir Goldstein wrote: > On Tue, Dec 1, 2026 at 8:51=E2=80=AFPM koraynilay w= rote: >> >> On Mon Nov 30, 2026 at 11:54 PM CET, Amir Goldstein wrote: >> > On Mon, Nov 30, 2026 at 10:25=E2=80=AFPM koraynilay wrote: >> >> >> > ... >> > >> >> > This is exactly what I was looking for. >> >> > PROJID is only singled out in one place (here) when defining the ma= cro >> >> > and a comment above the macro explains why. >> >> > From this point on the macro describes a trait, which has a very cl= ear >> >> > meaning, without mentioning any specific flag. >> >> > >> >> > Good job, bot ;) >> >> >> >> Yes, though, when trying to change the current code to use it, I'm no= t >> >> liking the name too much, since it seems like it's a subset of >> >> FS_XFLAGS_FSXATTR_MASK, while it's actually not, since >> >> FS_XFLAGS_FSXATTR_MASK does not include PROJID. >> >> >> > >> > IDK, you can try _[GS]ET_MASK >> > it's a more accurate description. >> >> (definition reminder:) >> >> /* >> * Writable xflags used to check and convert from masked request to unma= sked >> * request. >> * Includes FS_XFLAG_PROJID because masked requests use it but unmasked >> * filesystems that support fsx_projid don't know about it (because >> * FS_IOC_FSSETXATTR has no FS_XFLAG_PROJID bit). >> */ > > If they don't know about it why don't we strip it? > This comment does not explain this at all. > > Let me try: > /* > * xflags that can be changed on a filesystem that does not support masks= . > * The VFS converts a masked request to an FS_IOC_FSSETXATTR style reques= t > * for such a filesystem, so these are the writable xflags of that interf= ace. > * FS_IOC_FSSETXATTR has no FS_XFLAG_PROJID, but it can change the projec= t > * ID via fsx_projid. A masked request selects a project ID change with > * FS_XFLAG_PROJID, so it is allowed here and converted to fsx_projid. > */ Rewrote (the robot + edited by me) yours a little bit so it flows better: /* * Writable xflags for filesystems that don't support masks. * The VFS converts masked requests to FS_IOC_FSSETXATTR format, which lack= s * FS_XFLAG_PROJID and uses only file_kattr.fsx_projid instead. * Include FS_XFLAG_PROJID here so masked callers can use it to select proj= ect * ID changes on unmasked filesystems. */ #define FSX_FSXATTR_SET_MASK \ ((FSX_FSXATTR_MASK & ~FSX_RDONLY_MASK) | FS_XFLAG_PROJID) >> >> >> Which of these do you think is better? >> >> FSX_FSXATTR_SET_MASK >> FSX_SET_MASK >> FSX_UNMASK_CONV_MASK >> FSX_UNMASKED_SET_MASK >> FSX_CONVERT_SET_MASK >> FSX_COMPAT_SET_MASK > > FSX_FSXATTR_SET_MASK is ok. > None of the other names make much sense to me. Hmm, ok. > You could consider FSX_FSXATTR_MODIFIABLE > named after FS_FL_USER_MODIFIABLE. Yeah that's basically the same as _SET_, so I'll keep _SET_. What I don't like too much is the "FSXATTR", though since the project id is part of fsxattr, in that case it kinda makes sense. Thanks, koraynilay > I don't think it is better than _SET_MASK, but I could live with either. > > Thanks, > Amir. --a6e1a6523bdf7a6e2ec77ce4cfab5b9870610f2bb66618f0b9e2adfebe5a Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSgVimKafU5DQMcjcDmj22qf5IGXAUCaw86kwAKCRDmj22qf5IG XDjsAQCwxS/p/HIKK3kV+uy7dRTo1KlKQV2AgZVovhh+zOZxSQD/ckr/Z8kZwkri 2e9R9tGoCv8JDhsjabQwjNFG59TdkQ0= =MIWc -----END PGP SIGNATURE----- --a6e1a6523bdf7a6e2ec77ce4cfab5b9870610f2bb66618f0b9e2adfebe5a--