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=1795989321; b=rgw/JGgc2Qhx+uy67rj5JhESo7MQM7mwuBUxXLyps7Ctu2HJK2cWth+66p9p0ybbRNzJ Dl35aSV420OLIv6JKXq4pV6ux7ba25RuOUS9ZhoOKTPnfzRRmCKoYRY3DnyNGMW5sEg5N 1FtrNFxQs8YPDeWfst8GN7GT6Sa6NmYseXqZ4S8DnrHmH+mWlNEI2YKphIB+WGnejd6dG 63dn+RXcGngtNEC2SWbgAm915KnTEIziI9LZXQK1fM5We3N/ikKPvqldVH/4WG55FiqGZ gs3MBxdjxFMZgGfpOALTzacO1hBOZEExDqCPSTtnscleOd8Mi1tu2tO81MP3akMNPcw== 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=qNwljk9kwzYBez8/D9pZuHyRkGokFQYgCg3Jm762CVJFDsxQjtWl6KiJJLldTyNwvNvW ZYwMwjdVhCKWqNo/yX7Q4scVhdyJ4m3LoaQAKT9ma577XuK/G35GDegoir/RsiGoerCCy zeGEsTr/d0NZQT5PAkadGA8EppOs4dt2ekE5wLZq4uKuGB4KFbxW0Rgw0DB+dbPWp5D1y R0Y1XpdBFf85/eeCZLU83V/8ISjXckZFmXdNjk3QTo0FosFunAS2KNqt2g2lLWlovhQlC wB7/EKROcE4StqHKhPehApr5cXge6S+hQ+NsCD+EIGM+fABqRsVF85j/cx6o5m/4vsQ== 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.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 33DBF606A32E for ; Sun, 29 Nov 2026 21:55:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 33DBF606A32E 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-f47.google.com with SMTP id ffacd0b85a97d-490d59c3f0aso4464452f8f.1 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=Gs4sFloElmYGLO6YFGexkl2T2snVwBz/Z6xl+oJByJjO5btugDiwX7Rcc4DbAqYq5n Kkh++bGcXxG45g4tkNdgZElybnVH/hT2/rxDlfQH7tW3tzXWErBx/PoJBsYcSHXZuR29 UEdTMusW1oRiib2m5LRI29w7pVUhsKcqkk0OnsDgYH5FBg8RXhZdszXhe+GU1h1gnTdY 4Z2SpkQj7sih6xaj8WgrWIxH1w3c5FRMWNGqUqD8aiTSnzXvbKrpfoR/1bX0zFrrWCVo 37Kwuse7r3qd9uKkbFXstnwoscrRQ0vD8SK0YbiZ2SKEdXg7GdaBifCvFbzzpjROKgcH fbvQ== X-Forwarded-Encrypted: i=1; AL+hErHLE75I3jwvw6uZyogS4+FZNxtg76q0NOeUYJcufGgP86h+HyOWlzHbaIdJ3KcjARf9ClgpB8jfmYCFRBE=@vger.kernel.org X-Gm-Message-State: APuU4Z8Vr+AWFyA0rwyqAU6kX/6he7GJLjBJRUcXzjnvgJ4RY2kxop8/ ESe5hH6hBUGvX+ZYNiaoMqDkwNq+cTbOdxqUqA155puLvYjYc3JCGoyt X-Gm-Gg: AZFdTZeOMewQ5wQWp/WEJD5SzWAX+9vKlmqOZ6OwpU/aRJld66v8nRIsTIBToCZHukC oMjnXQW5Im2STGh8fCVKPmCNZ6yPEPk9vYV6R75YmyBvpSgRKfwZenqKwfef2hP6Jd1a+ee0lhh EQBQh4garYHF//rxOe30kRPFwiUYylzGISeZq94uCGn5XPjl581XTQNhY823AM2f2Ed9Ryt+81O giSTaJmnuRNXkZPbBm9Wz0YqGDA+UrderMgVPfR9Gew7EYmbh32if/MAryHgN9AICdzRO/9QB80 WPP06RJoo5TgorXicmEDZD8ASbqj93Dq01tQ4S09BLRYJAYvCl6sRn0gz6E9bg6Kyj9tvYcvioe 1Pv0//RT49b1i9GBpsWlaMGS/F/lBU47/YI1je6AKyv6+IzK/ncUmfCcnLZ+U34tIdNm2X8Kkun EwyCTkwdTchu9AwXS9RKmuh4OxSZesGF0rtIcSEBRtOSjSPHf+5OujveO7qaTD1/TOVtRZuVaBT imOnpdtQjguMUWHwCUw2O3iMcx/Uha13m4zXcBTOIKs8Wv+2INanvFYzSi8dpi88Dz8esJ5TrBm xl4F85QkGpjLOR3gj2cKkwPE5g== 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-kernel@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--