From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.54 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079924; b=vbtR+OAGZ7A05XmL9wpDzKefFG/d/QkC1KInNx1JOSakVCwOHJCiX1DJPshiCmoIJy+4 r7umWgjcgiCTHgpBSEUCIZ9aHTjnV8pVSH9DX5ysqCmsy1Tl806aysC36PEmjaFz6syE8 ZUmZsSjAnmcGJ44VYi/5Mq0enJKzJPVt6rCiW3yTibsrDNE+WnnDFqrTg22R8e4F8/E8Y XpqjQECVikRiILen4KRWv7W1oIgCaJ4RCWak7W0CJJf7kjQLpYwELtppoPdf3yZqP47ew MDhuRCJQDJ4UHyhxT9pkuEu8QKr6xVmIvVBIAOq3VW8S8FW9CZNJeeELx5lFfIqjGtg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079924; 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:To:Cc:Subject:From:X-Mailer: References:In-Reply-To; bh=8e1xWTlEg4W3kq7Qcea55rx8JiARuOkXGQlFzp6tNyk=; b=Ackwa9OlCQSEUPvr0YRiMVvEgXmsAr9QMdW8MbTJ9SaFDFB57clvakPWXCN1pKdM58xO G1lCiuIVAZjc5t6Pjd6ozC4RlL99TUrMYmG2FQ4jK2eHD2NqaDQgl40KAC90tARoGDCLX ZZVA1kiK4RY6tFm5LmRvF+hu7kwjHiCxv0qwvTEPHmPzk728mmnQl7tuPGkxT/9mQwc/W lBXi2uiVini6JqHIwFVxkI+fq8ZsArmnHMrt4NsUxAaASYoD52xxDPz1u7qkMwjYpuHnM AG8VcoGgHaSm3BVohekXBjhJTeGuaeJjgwdU4FfO5avaFRvJAxwHO0avRyQJNMcaQyQ== 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=APgpPzIw; arc=none smtp.remote-ip=209.85.221.54 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 73A19606A332 for ; Mon, 30 Nov 2026 23:05:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 73A19606A332 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=APgpPzIw Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-48e09aa5264so6493951f8f.2 for ; Mon, 30 Nov 2026 15:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796079923; x=1796684723; darn=vger.kernel.org; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-type:mime-version:from:to:cc:subject:date:message-id :reply-to:content-type; bh=8e1xWTlEg4W3kq7Qcea55rx8JiARuOkXGQlFzp6tNyk=; b=APgpPzIwc9lymnSAhYbegyrSSHYkBKh9HmAgHdfGNoQydZsZz+KoSnk0TysfSqNyjX klESfG2i8zav7uk8yyhYlTLCJxcRW2sIXdzLAqrWgRTKJaRRWK3/cZVA5W1Jx2Qb8oDD pyth8l1IM5nk0b0vGA+zULScD3PxMMlFqGvAvC8cvKeKZLKSFcnS14vCNcElV/FlihQ5 T8Swjglb3kLbuyVvkwsgpb09Q326pLlMuIZDMFT9+b014A+q+b2l8CfQIag97/0fD11P 7qQcfX/B57UBF9zWgkaYhBB8uA+Z8G/RC6NzNdvnxXj6Xsxgvf5+0b5H00ec2n3hy2jf qb1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079923; x=1796684723; h=in-reply-to:references:from:subject:cc:to: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=8e1xWTlEg4W3kq7Qcea55rx8JiARuOkXGQlFzp6tNyk=; b=0dU2RMRVgwFljmfWeA4SV6JgJSBAw0jB0R66OoaUgjlb6opsQiyBKqyFHjcJjMCwrG /ze7c9AAd5SyTHbXFjxtL3kJtcdlI/AU1CZdA9I1uGhUHtHCpxSlV6Z5IOE1lmbZFcYE BfpFqM3724xpOMFJ4ih9yGAcM7b3gkLAjq/0QoLhkidPUgGA3T8MuvlgemLEMb/o/L9P ZmzVfxb9pkTFBeo/UbVH/6/zBTzUFjz21PQt8JxDizYf6QwF9g4lrJAPsiffsbGQ4wnn owmj4sI8JqxfMacqbGVeWedVjNllmxlDJQzIre6dlgT2oSfmUv2+CaRrTZeZEGMOZF5M FDrg== X-Forwarded-Encrypted: i=1; AL+hErHRDd33KLpKX4HWiu9OIWvd5N8xMF41Bp9PWH24Dr7U7ppRRWZBahk1x4Sdn7v7FdR2aW7Cg4cFbhQ=@vger.kernel.org X-Gm-Message-State: APuU4Z+piJXATuAoKkW9/385g7lJG/npVIV1bTeMkd1KxO30EdJwXl+E PZGsuzRYef02PU3sGEOlaAFU5moBvsCdTzz73HoP3pn8y/dxPB/8RFrt X-Gm-Gg: AZFdTZdttNLLqskoIvC6USngRye3fjQVHYJ2RTyJssa1IQAXCOEhsBPGopYXcIVcLaV XLlYuLhxgbfrKEL/QVSCRq7Lv6le5mE4HD+Y+D4ZGCoNrgtNb9j+ivH26c65ybaj/SI8De12Qz1 56EhvAY45FxT76equ5jwQen42cnVnIPCvfSivE2yAOoixpLUwIE5XIBtok63J+7LtRZP9vPw8Pn Y+1QZIkPiJm5ZzxeFQs5UByIvNG2xhxgaGTXMnX1Gfuyq8k7PRBUpPVdAvwpPK67eS9bfgP7RM4 OPyNtLkd3k7gOXHEB3rrhKIwIeNUekkOhNg8XEpO1K1Bk+JNx14H7IAES//j6+oKa1KVwbbu5K4 G8DMJMmWuoyUOM91vbF9m4eK6jcJNMi7eRDt6SIvvnCVLefgeSednv2OQ5o/00IV546523gepTI +jzR2qF4kehZTTb36AL0+fs0d+0cizAzHxJ9qf6SeQVgH3F+BzSlxRh72NFtlPdtotyFBxeHr+e SFuqPYnEDNnQ4APx9keobDRNSjWCGzAHZgkMflLA+5yvvBbHzM4QlkJWxNuHsoyagkbOqfOXefz IJnJLwQ0v2dF1hSKje5A79Vt2Q== X-Received: by 2002:a05:6000:2886:b0:4af:9172:3238 with SMTP id ffacd0b85a97d-4af917234abmr66925301f8f.43.1796079922666; Mon, 30 Nov 2026 15:05:22 -0800 (PST) Received: from localhost ([2001:b07:5d26:7a6a:365a:60ff:fe0d:cfc6]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6a67f281sm64217562f8f.22.2026.11.30.15.05.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 15:05:21 -0800 (PST) X-Mailing-List: linux-nfs@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=32fe4cacfd6502b9f1573240d1121a46ffe0bc047f8b98fa581cbfd9df21; micalg=pgp-sha512; protocol="application/pgp-signature" Date: Tue, 01 Dec 2026 00:05:17 +0100 Message-Id: To: "Amir Goldstein" , "koraynilay" 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" 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: --32fe4cacfd6502b9f1573240d1121a46ffe0bc047f8b98fa581cbfd9df21 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 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 macro >> > and a comment above the macro explains why. >> > From this point on the macro describes a trait, which has a very clear >> > meaning, without mentioning any specific flag. >> > >> > Good job, bot ;) >> >> Yes, though, when trying to change the current code to use it, I'm not >> 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. Right, I'll with that as well. >> >> Also, could we change FS_XFLAGS_FSXATTR_MASK to FS_XFLAGS_FSXATTR? (a= nd >> >> so also FS_XFLAGS_FSXATTR_RW) >> > >> > This reduces readability considerably IMO. >> > There needs to be a clear separation between the >> > flag macros and the flag collection macros (traits if you will). >> >> Hmm, fair, I proposed this change because the names are getting a bit >> long and formatting the code is harder, also they have FLAG*S* that can >> indicate it's a collection, but that's easily missable (and indeed, I >> can never remember if it's FS_XFLAG_MASK or FS_XFLAGS_MASK, one more >> reason removing the _MASK may be beneficial, at least to me lol). >> >> >> And I'd also change FS_FILE_ATTR_XFLAGS_MASK to maybe only >> >> FS_FILE_ATTR_MASK, so it's not too long. >> > >> > Losing the FS_XFLAGS_ prefix is not good IMO. >> > I did want to offer a change to FS_XFLAGS_FILEATTR_MASK >> > to be consistent with the rest of the collection/trait macros. >> >> Hmm, right, FS_XFLAGS_FILEATTR_MASK does indeed look better, though it >> is getting a bit hard to distinguish between them when they have such a >> long prefix. >> >> FS_*_FL are easier to read. >> Actually, could we maybe do something like FSX_ as prefix, if the FS_ >> prefix is not that important? > > It's not that important, but.. > >> >> FSX_IMMUTABLE > > This is in the uapi and changing them in kernel will be a lot of churn Yeah, I remembered that after sending the email lol. >> FSX_PROJID >> >> FSX_RDONLY_MASK >> FSX_FSXATTR_MASK >> FSX_FILEATTR_MASK > > Those are fine by me Nice, then I'll switch to them if the patch wouldn't be too large. >> >> or if FS_ is important: >> >> FS_FSX_IMMUTABLE >> FS_FSX_PROJID > > Those not for same reason > >> >> FS_FSX_RDONLY_MASK >> FS_FSX_FSXATTR_MASK >> FS_FSX_FILEATTR_MASK > > Those fine > >> >> or maybe? >> >> FS_XFL_IMMUTABLE >> FS_XFL_PROJID >> >> FS_XFL_RDONLY_MASK >> FS_XFL_FSXATTR_MASK >> FS_XFL_FILEATTR_MASK > > Those are worse than all of the above IMO > >> >> or something else that is shorter, idk. >> >> >> >> >> And at this point, we should consider all _MASKs to be frozen and onl= y >> >> expand FS_FILE_ATTR_MASK, with the exception of converterd FS_*_FL >> >> flags. >> > >> > This is something that we can definitely document as a guideline - >> > use the latest v1 syscall uapi for new flags, with the exception of >> > xflags for existing FS_*_FL flags. >> >> Yes. >> >> > However, a filesystem can only report a new flag after it has opted in= to >> > masks, >> >> Report as RW or as RO? >> >> Since for RO reporting it doesn't need to, it just needs to do that for >> get (and actually, only for the wanted xflag, it probably doesn't even >> need to report all its xflags in rw/ro masks apart from e.g. MAYSHARE... >> or maybe not even in the masks, since on the set path vfs treats it as a >> "legacy RMW"/VER0 filesystem). >> > > Whatever guideline you write - if it makes sense its good, Fair. >> > so if a new flag requires converting many filesystems, >> > it may not be realistic to maintain the freeze rule. >> > >> > Hopefully, the work on the may-share flag came just at the right time >> > to allow for the ro_mask exception, so observing the guideline for >> > new read-only flags seems doable. >> >> Yes, MAYSHARE for testing read-only, BTIME for testing read-write (and >> read-only). >> >> > >> >> >> >> so: >> >> >> >> FS_XFLAGS_FSXATTR would have the ones that are in right now + all new >> >> FS_*_FL converted ones (same for RDONLY and COMMON, etc) >> >> >> >> FS_FILE_ATTR_MASK would have all FS_XFLAGS_FSXATTR + all new ones >> >> (MAYSHARE, BTIME, ...). >> >> >> > >> > Yes, it sounds like we are converging :) >> >> Yes, though that has been my thinking since the first time I wrote >> "FS_FILE_ATTR_MASK" for the ptime patch :D >> > > Yeh this is a tough one > and this is before the patch set got review from a wider audience... > I praise your perseverance. I really just want ptime or settable btime, lmao. > >> >> > Isn't PROJID in FS_XFLAGS_FILE_ATTR_MASK, but not in >> >> > FS_XFLAGS_FSXATTR_MASK? >> >> > Is there more to it than that? >> >> >> >> Currently it's set like this, and there shouldn't be anything more to >> >> it. >> >> >> > >> > Nice. Looking forward to v4. >> > I hope I have some time to rest before, but probably not :) >> >> I should take >=3D 1 breaks too instead of working on this when I'm not >> doing other stuff, but I already know I won't :) >> > > Maybe if there is AI outage you can rest :D I actually finished my normal tokens and using some API credits I got for free right now, so maybe I'll take it as an excuse :) Thanks, koraynilay > Thanks, > Amir. --32fe4cacfd6502b9f1573240d1121a46ffe0bc047f8b98fa581cbfd9df21 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSgVimKafU5DQMcjcDmj22qf5IGXAUCaw4BLQAKCRDmj22qf5IG XGNAAP9cipNNRkl3b/wt+ge30TBRtIK5YY3b3z4HCKmRWC8WTAD/UvanMWjh+T/4 XSm+6I9afpFy5E8Q14Ai7nGOOWZkrg4= =bPVy -----END PGP SIGNATURE----- --32fe4cacfd6502b9f1573240d1121a46ffe0bc047f8b98fa581cbfd9df21--