From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795989321; b=mIGjAuKDuz6wU9fK2HP5cyZOGDfpJUgplpVuFCxKqOPwsIH64FxapK+T/5utZ8QS7KBG dDpHRioLWD9i2uRQGFlU8Xh0MWS9bAm12VHMiF6aKQQ5jcgLxWsDuRUEEMbMfku/hzdZf PZGcBiHzXJeYpXZhUtn6GIa+AaT/inuk8H6l45ESnN8/VMTXJhnGEAKCREm7dSO+XaR4J vO+MULBrtGeZXDVkTtctOK8tH+c8gLeigChg2us7GFE0RzWKE6DUnSKP1GTv+mYbOvqcI CHQ2/B/krQDYVFOPe+VMEiwIGrveXwMwvKL2U4EctNKab3AuTFTWQcCQHi8CBIdA3Cw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795989321; 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=GjWcfWDnSewTRzk5MRlK+k2JMeETf2SM2R8BlTiBfTE=; b=1JsD9XPA4XmCzV9G0JavNW5ZVjh0bRt5uogvEcgGqmF14YWSL1V20+Kq/BV7SyYm+Q8f WHJjgKiLfVL5DCGuAn5bekr8W4Ql3jfj1Ukub4gXvTJKjpfw7eP5xz63NuisH6TJldP7P edZRuZWx5M1riUxDAMYaeP1/aqzmWMBNT+iMKU5GgSN23SrMekrs/qvhOxBCpHbmeNo88 m2l48W/LGdN6QPEWyvMm3i4qQYRB5KmUZL9Lh0MXafWpHW/I8I14VZ4R6DMSRbNo4X22J J/qFN9A0vpnF7yu0WANwZcoNe/MmbF2E8xCunvLFTM44Lx98kAYrc62Amh1KFG3txcA== 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=WpWVcoY9; arc=none smtp.remote-ip=209.85.221.44 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 237B8606A31C for ; Sun, 29 Nov 2026 21:55:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 237B8606A31C 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=WpWVcoY9 Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-49412eb1474so6477092f8f.3 for ; Sun, 29 Nov 2026 13:55:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795989319; x=1796594119; 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=GjWcfWDnSewTRzk5MRlK+k2JMeETf2SM2R8BlTiBfTE=; b=WpWVcoY9o8B2czkCOM0sh6j3I09TTwvuAE5Zytz6HO8JhPW1vSXcU/rCtp+r6rpJ1t 8WlK+ctD3fpnNpKm0U5fnvRCNf2rz7e+fDLyuehTKJV2NLlF+CjN8KsnJxRYgZEIOxme r2yih42BtlJrSuty3lykvk6V47ZyYIRV5LtK+qpsucxk/hM+0bOtvF6iJ98tt2GuzZuB 3ZHzNUJduTEYgV/yeSNXLvLxel/VN0dne/3rMMhUH85IFq23Zq4VLlbeUX0rHMapgils vsRHRymy0ut5lFfVHdU0/3nxwFJme9HL+P9FEr3UcjYfnOd9QY8hILAAza+iHJB2GqUb 04cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795989319; x=1796594119; 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=GjWcfWDnSewTRzk5MRlK+k2JMeETf2SM2R8BlTiBfTE=; b=09vzSbmh6ULi+ZEYY4KYWdxzrmjv35kQvnWf/NbQyubi+/82M4o8ACgyNIJRDMBW24 WQuP6Flbpn59hl3eqBIb8UgWXCqpdKoXa5SHksoHoJ7CmIrn43CLsH3moUikYETjH55d evg9QYeqIjy9tGW3PDpjhyYtJy2/U2390SLiLnfbW2vQnzKnimioLVP3RQBKmtUGgB0v jN2A0nH2jV8T0CsPIX2ot7/Ti0aTyqk6uJERC01YCWGpqwSaQ7FbAy13SZi960yfDKo1 9Kewa7KCSG/Co7ytY9GdMKiiq/TMfQQ57re40pZaRyxCUsV9BdD6U85ihlG9aI+ek3oz jsFw== X-Forwarded-Encrypted: i=1; AL+hErFd+lNUyKwH4fJ//mH54AhmKd9I3/ED1WMPugKdQuqaRm7gJArIGr4qysv+R4k4s9qlZoQPqQummc37giz0@vger.kernel.org X-Gm-Message-State: APuU4Z9HmZJ309kGua6m5AW9zu3lPVLayc13XnLgxfNpr4mH7UKN+glF iNVX2J1dAS+sgo6tO60ujkhZVKZkH1AV7Z1sg4zQ8UTh9NTFuJDnG5ds X-Gm-Gg: AZFdTZdIE/ee5n98npYfHkoTx17SqPOwkzbgsqu06MKI3sGRmRRN0a+qQe8Xi2+n3cV 3CtgxuL+bFu31NNQrouty4adPkN3NsDDZHEypa+QcEB2K/cy3rkC9ubhXw/WJGK6th13A3MgF3a IP8RdhCgHJFcZp1B3DucxtOCLONJy3WRwhgdb7xl/iNTZDym6I48c2WnOBu4mntKBESv0NN1+ej y+4njWR1dQv7LhHmImG4LHhfjt3VYaN/xa5OrpMFyeLnSd+BRgCmHHi6s/tGjJObBf1Et5IHuw+ SeSu2DrIPlS2z9+2/o0zVxsvpSmjB4/YabS+JjWI+A4AX6Wke6kFBe+Aq3gehcIkGVZzQYxNhw2 6AH0GofICPOIb23xp/PQLKTLYK6hVvSIPwvg4bu9mDYL8JCOXsy4cM+jVUuxeXny6KRV9Ges6HZ jiiHi1ZOrp8nEhLFDQniUQN12OF2pNDF3YkuDw3JU/iVTp3rZDMutTLBovmhsvhZP8vLR+czig1 whEEvBwnq9KvbYnAr3xER7teD0vsAb2ZgXMYFXMFosM3Jf/VGRKy40yU5o94VOA1qFBxCUf0tar 0Pl4uISL1I9sKMoYeJ2l7lYrGw== X-Received: by 2002:a5d:64c4:0:b0:48e:7b12:ac9f with SMTP id ffacd0b85a97d-4abb5fa17f2mr64462412f8f.40.1795989319461; Sun, 29 Nov 2026 13:55:19 -0800 (PST) Received: from localhost ([2001:b07:5d26:7a6a:365a:60ff:fe0d:cfc6]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab658e2d55sm60188730f8f.5.2026.11.29.13.55.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Nov 2026 13:55:18 -0800 (PST) X-Mailing-List: linux-unionfs@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=55d938c1187735d86cbf36ff5442822b1788f20fb9bab89bb4d96a9af24c; micalg=pgp-sha512; protocol="application/pgp-signature" Date: Sun, 29 Nov 2026 22:55:17 +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 3/5] vfs: add COMPR/ENCRYPT xflags from FS_COMPR_FL/FS_ENCRYPT_FL From: "koraynilay" To: "Amir Goldstein" , "koraynilay" X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261129024233.2361718-1-koray.fra@gmail.com> <20261129024233.2361718-4-koray.fra@gmail.com> In-Reply-To: --55d938c1187735d86cbf36ff5442822b1788f20fb9bab89bb4d96a9af24c Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Sun Nov 29, 2026 at 10:30 PM CET, Amir Goldstein wrote: > On Sun, Nov 29, 2026 at 7:20=E2=80=AFPM koraynilay = wrote: >> >> On Sun Nov 29, 2026 at 11:11 AM CET, Amir Goldstein wrote: >> > On Sun, Nov 29, 2026 at 3:43=E2=80=AFAM koraynilay wrote: >> >> >> > >> > "vfs: add COMPR/ENCRYPT xflags from FS_COMPR_FL/FS_ENCRYPT_FL" >> > >> > This is not the best description of this change. >> > >> > A better description would be >> > >> > "vfs: advertise COMPR/ENCRYPT xflags in file_getattr()" >> > >> > Which is exactly the behavior change that I asked you to spell out. >> > You spelled it out in the cover letter, but not here. >> >> Hmm ok yeah now I understand what you mean. >> I should make the commit more about "let userspace know we have these >> too" instead of just a "add missing flags". >> >> > The commit message should also mention FS_IOC_FSGETXATTR >> > but for brevity the subject above is enough. >> >> what about this? >> >> "vfs: fileattr: advertise COMPR/ENCRYPT xflags on get" >> >> and the masks patch could become: >> >> "vfs: fileattr: add xflags masks to internal and user API" >> > > I see no reason to go there > > "fs: advertise COMPR/ENCRYPT xflags in file_getattr()" > > is better because it names the actual syscall name. Hmm ok. > fs: is more standard practice than vfs: in this code base. Ah, I did see a bunch of commits had only fs: but didn't think it was most of them, will change it. > fs: add xflags masks to fileattr API > > is just fine as a subject IMO. > >> > The commit message should also mention FS_IOC_FSGETXATTR >> (And I'll add this to the description) >> >> >> Introduce FS_XFLAG_COMPR and FS_XFLAG_ENCRYPT to be used in the vfs >> >> _masks API upgrade for fs/ntfs ([1] and newer versions). >> >> >> >> Following the FS_XFLAG_CASEFOLD example, put FS_XFLAG_COMPR in >> >> FS_XFLAG_RDONLY_MASK but not in FS_XFLAG_COMMON, since it's read-writ= e >> >> for some filesystems and read-only for others, to avoid breaking >> >> existing filesystems. >> > >> > This sentence is very hard to understand, because it is missing some >> > important information. >> > The CASEFOLD flag (and now COMPR) is only read-write via the legacy >> > SETFLAGS ioctl and read-only via the xflag apis. >> > Also in your documentation patch, you list them as RO/RW which does no= t >> > fully convey this meaning. >> > Don't forget why you started this patch set - BTIME is also going to b= e RO >> > on some fs and RW on others, but in a very different category than tho= se two. >> > >> >> >> >> Following the FS_XFLAG_VERITY example, put FS_XFLAG_ENCRYPT in >> >> FS_XFLAG_RDONLY_MASK and in FS_XFLAG_COMMON, since it's read-only for >> >> all filesystems. >> > >> > ... in all the uapi flavors. >> >> Hmm, yes, but I should mention both "uapi flavors" and "filesystems", >> since casefold can be toggled only with SETFLAGS, but not on all >> filesystems, while saying that ENCRYPT is read-only for all uapi >> flavours doesn't mean that no filesystems supports setting it (well, in >> this case that's true, but in general there could be a filesystem that >> decides to expose a FS-specific ioctl to enable/disable >> FS_XFLAG_ENCRYPT and that reports FS_XFLAG_ENCRYPT in fileattr_get). >> >> Anyway, I'll change the message to be more easily readable and mention >> these cases. >> > > Just try to keep it minimal but also accurate. > > The fact that ENCRYPT is settable via another API is very much > non interesting for this context, so just need to find a phrasing that > is not incorrect but also conveys the rules about when it is ok to > put a flag in the common mask. Yes, what I'll say there will probably also depend on the new comments for the constants in fileattr.h. Thanks, koraynilay > Thanks, > Amir. --55d938c1187735d86cbf36ff5442822b1788f20fb9bab89bb4d96a9af24c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSgVimKafU5DQMcjcDmj22qf5IGXAUCawyfRQAKCRDmj22qf5IG XH5iAP46YExFZZcFyPb92rBl6Y72Y7Y14QPf3eqau18EqGwKdwD+IwLX24o/3OA+ 9x1El7f5H4f/LPi7X5Yi9aQxKb7deA8= =NChg -----END PGP SIGNATURE----- --55d938c1187735d86cbf36ff5442822b1788f20fb9bab89bb4d96a9af24c--