From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796341062; b=WnZGcQOFWjUf2xjLgRrAlLryTNoMvyaTG0qQxUOe92qGD/WUoPQNoHTTUh1MBZzojpci Fbj02/c0wxRZL0txBb/TSbBoQ1/wrQ4l8kdP+C+GqnT4p0l2PCuYJdDGe5j2ElLULRS/o aBJ7AtlRenBnO9bPOpM0TRAgv4Vn54nSFS7s+0MaDy7XgHkpQwYXxhmzNOnPQledDNjQV Clpx1uJ4ukZrahSY02YUbJNeN5HdmOgFup9CKjkncN2xDB7bCC01UfVN4PkL5nNDhRz/Y xUSUNo7MxzhNbH9lq2hDckZ+w0Dj+fkB+Vct5CpkpDJQ0g03b8+SuNE5uphjOosgaBg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796341062; 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=hyxA8cq82+x2Lvsqv9Ogl9nd3m3ALtVmALqnqXJiByk=; b=sXOgeYEOJV9mz0z+eS/7WFqwfisAyMABTKbIq5du5aSze9y4LEwjutNGuEjQ6WSz3YH/ 2QQEjQKOeC02EiKmgNls6M6HUvjvYesRmZjcAgJaZplkuomURVvP2sXKrGSnQC0pRjhpC JhTYWONX8icAYcvmUl8M6/jX2izIojNETWTCaDTRKPDm2E38kW6+sGofwM/1ZU8+BMCBX KCMI0DvZNEELguOtzkLZQu0CbT2tHXvJn8+9CVEFBgHT1/oDrLM5ztXIgVcxmJex9LX0z RJSAM0hidWfpxP9JWxhTmrK6BwIQqRvBAUDv6cH7wQ/NKlyzV2Hqa4QTHYfGPMvwNjg== 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=qFHXE8oc; arc=none smtp.remote-ip=209.85.221.43 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 8F473606A32F for ; Thu, 3 Dec 2026 23:37:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8F473606A32F 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=qFHXE8oc Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-48e3b22e971so182802f8f.0 for ; Thu, 03 Dec 2026 15:37:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796341060; x=1796945860; 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=hyxA8cq82+x2Lvsqv9Ogl9nd3m3ALtVmALqnqXJiByk=; b=qFHXE8oc5K3+BVwVmbzDyD0lprZ9VVfWGFywRb/Jw3wTppLTAsz5KtacO9pGXgi+DX 6GH/TcrHYIqrZR1iHBiCAPm0YbU9oHjIfj4TJDgy8CCHU80s79jeWHBoeFnSWQ/ljeou Iy3yylZQ778l4QUFzfT+tBPlWxuFK0J0tSw2q1XyLC47i8VKDEvVzIkZE4FUaB9OQhuE pF4XPJT4DdU07n8F5E8ZBus7gjFOsbta5cJEDT2ZxNfSFBlAMcqPZqsu6lLBpiiKlX6e N5Ld0IgZ085MK66VWYXZ9ECB6pZXNXohbn+WUnH0+GdJ8tKM8sdLPEAEmc5cld/pFCgT jchg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796341060; x=1796945860; 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=hyxA8cq82+x2Lvsqv9Ogl9nd3m3ALtVmALqnqXJiByk=; b=Kn1ojqfTWF2rdANY4Ye2kKKNb9QonRLGjmVoAHVfTfPoYkPD9C8PZiQLwvfNsw2MiR bvujwXx/HnWWj8ZB79B2YByuNGjR3I7W6LxSElXD9KsNxkva5/Qtu25I6zP/bC3Q8ay2 S5fNLijK5tLoteiDg602SiEfbh5vzGyV+c+sIhOBPTCWw89I1tQzV8jC44faca+z76ML 8LsSSf5xVpN0iAGemwLLYqhjH/q+dAQV3IAlh6KRij/S9sGOemVSiU7wo+mNcPqyeSSy 7dvC9ncuPtSjwly/jd6/UIM1AX8gjSA2ZGfJ3aZS7Ro4ax43GFcVDOXVvZxOWPmJEAGY MmTQ== X-Forwarded-Encrypted: i=1; AL+hErG+UaIuT9EtZofBZqHgqZN3xV1FwkQm1M8nb7KITHioByo4ZVH3DF7KnC9ukqk4hX9Sw7inqK6fE65dtA==@vger.kernel.org X-Gm-Message-State: APuU4Z9rSESsLMuUNAxziIpo4fot+4v9x8UMgJOO+FdyuI75sXTXvqRR 0AARt1LElMosj+4GixtKtuBNDYevdTmxA2Cs8ZQVQBFHSa3hGVDyjLKj X-Gm-Gg: AZFdTZcPG8+9Fp43Wi7wJmSZPKSFJo/4uBKu/UMpMtONF/oYURTElY5u9ERkCZRurmO 6JefFGMFyIZ4mJgpkJqwxTQjnI3NmxhH41DhCShDcngn0jmdIAlEx0YkNxV4NPpu+xLYC/sp1py cojT+GZCp8i3rxYMB0/nMoa+FfMoEqX7V0bQV7TAUGN40mHJ5KDL7ebWjLRcFj821ASHkDahTCj euoNiSu/PvLwukCIReDc48ld5BUer9Td99DGGYDngKJ5Iiuit9sl7bq5n0w24fc3HbEnGLQGnKT jGqiRMnyN3HsqYuuZ65W9H5Bmyeg3JEsCus5JB4GROmkQsedcl5+m5v2ERPJSuUp5P//DUGDjkd hBGL/c09UtH4gaENz2hCg66kY9TxKQBS/sOdEblddXD18SsBWzDGrkRajLWRcBdAN2DzKQuYUPq kMeS/IDBErT5s5Zxl8W9CgUXy9V8TzxGTtrefZUhWxWKG0fapTNhnPqO/3ar41OvrorNWAyDohi 7J1HLom7mu5qzQr4WH+T0KQeh7775mufynyXP4IR+a10JLKTDiDzRTr6mft+qSFUPHyfQMM1Vuy Xm2AOf5fgWxV7q7CoLsjxAzpGJU= X-Received: by 2002:a05:6000:4b10:b0:48f:d7cd:a5ac with SMTP id ffacd0b85a97d-4d1dd2ba135mr778746f8f.0.1796341059884; Thu, 03 Dec 2026 15:37:39 -0800 (PST) Received: from localhost ([2001:b07:5d26:7a6a:365a:60ff:fe0d:cfc6]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4d17302b0f6sm1492263f8f.31.2026.12.03.15.37.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Dec 2026 15:37:39 -0800 (PST) X-Mailing-List: linux-btrfs@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=130edb789a255da3dad06ee7e98bd1cf77bce52e12c6538a251300d7fdde; micalg=pgp-sha512; protocol="application/pgp-signature" Date: Fri, 04 Dec 2026 00:37:37 +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 v4 7/7] docs: add fileattr API documentation From: "koraynilay" To: "Amir Goldstein" , "koraynilay" X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261202215427.798262-1-koray.fra@gmail.com> <20261202215427.798262-8-koray.fra@gmail.com> In-Reply-To: --130edb789a255da3dad06ee7e98bd1cf77bce52e12c6538a251300d7fdde Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Fri Dec 4, 2026 at 12:29 AM CET, Amir Goldstein wrote: > On Fri, Dec 4, 2026 at 12:07=E2=80=AFAM koraynilay = wrote: >> >> On Thu Dec 3, 2026 at 11:59 PM CET, koraynilay wrote: >> > On Thu Dec 3, 2026 at 11:52 PM CET, Amir Goldstein wrote: >> >> On Thu, Dec 3, 2026 at 11:20=E2=80=AFPM koraynilay wrote: >> >>> >> >>> On Thu Dec 3, 2026 at 6:45 PM CET, Amir Goldstein wrote: >> >>> > On Wed, Dec 2, 2026 at 10:54=E2=80=AFPM koraynilay wrote: >> ... >> >>> >> +| | ``FS_XFLAG_FILESTREAM`` | >> >>> >> ++------------------------+--------------------------------+ >> >>> >> +| | ``FS_XFLAG_COWEXTSIZE`` | >> >>> >> ++------------------------+--------------------------------+ >> >>> >> +| | ``FS_XFLAG_CASENONPRESERVING`` | >> >>> >> ++------------------------+--------------------------------+ >> >>> >> +| | ``FS_XFLAG_PROJID`` | >> >>> >> ++------------------------+--------------------------------+ >> >>> >> +| | ``FS_XFLAG_HASATTR`` | >> >>> >> ++------------------------+--------------------------------+ >> >>> > >> >>> > Still very much not happy about this section. >> >>> > How about merging only some of it with with XFLAGS table above >> >>> > For example: >> >>> > >> >>> >> +| Flag Macro | Hex Value | Xflags mode | Fl= ags mode | Description and Constraints | >> >>> > ... >> >>> >> +| ``FS_XFLAG_CASEFOLD`` | 0x00040000 | RO | RW | Case-= insensitive lookups. | >> >>> >> ++--------------------------------+------------+--------+--------= -----------------------------------------------+ >> >>> >> +| ``FS_XFLAG_CASENONPRESERVING`` | 0x00080000 | RO | - | Case = not preserved in directory lookups. | >> >>> >> ++--------------------------------+------------+--------+--------= -----------------------------------------------+ >> >>> >> +| ``FS_XFLAG_PROJID`` | 0x00100000 | RW | - | Proj= ect ID value flag (VER1). | >> >>> >> +| | | | Updates= require ``init_user_ns``. | >> >>> >> ++--------------------------------+------------+--------+--------= -----------------------------------------------+ >> >>> >> +| ``FS_XFLAG_COMPR`` | 0x00200000 | RO | RW | Compr= essed file flag. | >> >>> >> ++--------------------------------+------------+--------+--------= -----------------------------------------------+ >> >>> >> +| ``FS_XFLAG_ENCRYPT`` | 0x00400000 | RO | RO | Encryp= ted file flag (fscrypt). Read-only. | >> >>> >> ++--------------------------------+------------+--------+--------= -----------------------------------------------+ >> >>> >> >>> Oh, yeah, the 2 columns for RO/RW are nicer and I can add a column s= o we >> >> >> >> Yes. >> >> >> >>> have "Flag Macro" "XFlag Macro" ((I really don't like "Xflag")) and = have >> >>> only 1 table instead of 2? >> >> >> >> One table, yes. >> >> Writing all the flags there like this and their hex values: >> >> >> >> FS_XFLAG_ENCRYPT | FS_XFLAG_ENCRYPT >> > (Assuming you meant FS_XFLAG_ENCRYPT | FS_ENCRYPT_FL) >> >> >> >> I think it's just silly and has no place in this doc. >> > >> > Hmm, can you check how it looks? https://koraynilay.neocities.org/vfs-= masks/fileattr >> > (don't mind the unclear writing in the note above it, I haven't read i= t >> > manually yet) > > In my eyes it is ugly, because it looks like a page from a spec, which > is not what > this doc is about, but I can get over it if it means so much to you. > > How exactly is this: > > | ``NOCOMP`` | - | RW | .... > +------------------------+-----+-------+--------------------------------= -----------------------+ > | ``COMPR`` | RO | RW | Compressed file flag. > > Less informative than your expanded form? > > As a design/overview doc, what is missing to you when you read this? A way to see, at a glance, which flags already got converted to xflags and which not. While I like this because it's informative, thinking about it it would be pretty useful for the > Please document the rule that a filesystem should accept masks on set > only after all of its writable FS_*_FL flags have xflag counterparts, > because FS_IOC_SETFLAGS of a flag without an xflag will fail with > EOPNOTSUPP. Until then, use get_only_masks. part from the first email, so developers can see how many of their flags need to be converted and decide if it's worth the effort or not. This way they don't have to grep around and still not be 100% sure (or they just make their LLM generate a table like this). > As a design/overview doc Personally I don't mind if it's in this exact doc or not, but if not, where would we put it? (I am also totally fine with keeping 1 general table like this > | ``NOCOMP`` | - | RW | .... > +------------------------+-----+-------+--------------------------------= -----------------------+ > | ``COMPR`` | RO | RW | Compressed file flag. and have the table with only the conversions by itself (like in this patch).) Thanks, koraynilay > Thanks, > Amir. --130edb789a255da3dad06ee7e98bd1cf77bce52e12c6538a251300d7fdde Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSgVimKafU5DQMcjcDmj22qf5IGXAUCaxH9QQAKCRDmj22qf5IG XJjCAQCXK9QUeiDEwlcmix5XWbZ+P4xK5w2djQZ2PFmbe7NhbQD/dvkXoNbGb69x PlzjIV8I+ldpi7xYZ5aV4fvPI1MvKA0= =9Oda -----END PGP SIGNATURE----- --130edb789a255da3dad06ee7e98bd1cf77bce52e12c6538a251300d7fdde--