From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.50 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796566711; b=IztjzKeQwYNxd1ZIQhPUtzdri+MBgJp5MEDQCH9eI+8MT8bXKCxUzE7EwsVcx2CpjdVZ zFOTvY7Y1uoXdMfjYFoswxuF0HMzXKWsINSler8kMw7Zh+iX80ywj0h34/DCdEfnE0sFe 8sSiPKcp8vK07EDqxaMo8Vq/6UU7DHVZvI9smyMPt/tQ7niVEcOpNsrPvuZP7dDpHfTxD 3EiIyymRb6n6ni17mJPSqdha8jY9HCnM6Vdjsa93HPIs6dfaFaB5lgDVNla9dBprtNrbx 2VUqvO1vI/w/EYkk7+7/reW2WiwYf5DOMtv1ej/fc4Z6XNZuMVKd+NJvhix8oKR4Fmg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796566711; 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=1Hs+cstTuqu4jGFOuczoC6oR8Ddz+AjV/ckEJP1K1SA=; b=q+o3VDG3x2lMOzwL/mUHOp0wyuVa9MCK6hY5x1rbQOzGX78R/4FXbmy6254dS6a9b02f dXfega+vFXFucuI/Lxc4enjxD59LVoYwX5O9Fniizso8rb9mu38GlVlOZY1VUDkNt1l9F NW4/o/s0CMcI8OQ+xAh9Kcp+GTYV1/VFp3lp5LTtzHugJRmUkC+cl/gH8rGtrua4qa6ua 6QcWpyfQLqECx8trtOhAJVh94ohxjcB9RaF/h2e92WDUW8U7d88Et6kAsPf//YX6XeOrZ sfVRbxQwb75OfmAx3SvIhEtAI4v3yVK7y2rC6fj0zSogyXS3MEKZ/DUVT6vvbGaLAkg== 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=W+OQ61kh; arc=none smtp.remote-ip=209.85.128.50 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 0591E606A321 for ; Sun, 6 Dec 2026 14:18:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0591E606A321 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=W+OQ61kh Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4bba5e17728so17136085e9.2 for ; Sun, 06 Dec 2026 06:18:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796566709; x=1797171509; 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=1Hs+cstTuqu4jGFOuczoC6oR8Ddz+AjV/ckEJP1K1SA=; b=W+OQ61khuMWqVc5jKMY1ZRuVzxiQx1HuJJh4/K8OVk5zMYwfIQ8soIqwLKWMHZzi2z o55q7IS2ScbnGieH11q8+ydBp30nym3gLOiIXe1IGjZFZBpHkWWlHzeblegc1riQKrCC Jq13osuze3UnxBwAOE7WwBO0/NwcH2fSx5hNu0VOqfNIsQOsY31icPCeNTljwyOlxfT9 tN5yUbqsxaJNz0hapF9U5o/QMpEiFKCtkru5WZksTyvgiTXE4wJMBsqFm4PKJ2Wk1AOm 5Q9EZJygPw4C49tsZKmup85TEyQfJr49pG4gZ33XCYAhGdZRkLsWptY9qcDLxMGjFpwq ggBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796566709; x=1797171509; 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=1Hs+cstTuqu4jGFOuczoC6oR8Ddz+AjV/ckEJP1K1SA=; b=E086lPTkxi0eiH/qzQiQipGdYLeEu2njPliDqxgj1qY9myBaCOXvycwTnp92iyAm4c sMupjyyvvIOhnekHOc7UWK8Ur1dYVK6zwGEXPJUiKuTpWtzu/XeC4Gs1LVH6PXq+nRLO 5ZLsj7HYJ9KNT2xf7VtBLhZ+wuVkl6b72MVMXyAxM0Oo9WwM+CBX7qZoLPpwqLbwec9n HItZVWnSDvQ4kc+GfXM/y6PqJJpnvh4s4BX0g+636ORyuGZMBZh1/mSTS4e6drPSxV/M gLLPfo67qL1wgAEah6Vte2wg0H2L0AOjDxMEXG6yg25OwVwgpmuf418E96RnxBdGQTWO kFJA== X-Forwarded-Encrypted: i=1; AL+hErH6kXukEgz9XiVR4bJ53p3qbkaSqsC0TPkCBcqZGW71/CuxFVlG99MiHvvpdRQQQRYSfA1gfsnUCn4=@vger.kernel.org X-Gm-Message-State: APuU4Z9ycDgFezgESMHaLksWCZel6vfKhiB0O4dV5doKev5O90bZbInC Xt+tcYDzJ1qXgnyX0MTAL6Uz7hOP/gI5B8Wt/HuHGejs5yr19Mgjwm/o X-Gm-Gg: AZFdTZf7NXoUiKO8ERyf+4aeiw4GFA1LTb9pWlq2XXNLOKrETSGDS0UHQ/nQhT98k8t X5ETHfrsnTA9/yJw3/NNghCgmhj7fARl1Apqmo6ysXEiTOLZ38N+g9TWZyZK1PHmxmTvVD98mAN kjfAx6mGzFyNPFpr/FfY2+jvFlmuu1MaE7HLAPmbwPHkKBbFwWKNbkOVCT89J2Xfss9kcLuBlRT 36gnAxRZWsDhVX0YoRw4zeSPbh3spctMwzTA+FFM6X3+chkyzduaDGkrWyOWXCRQ7tNiUnzkwH6 yA0wdas19aVjNJ5bSOaEFZpljx+WFOCY4tlbTWG4U7/4zRRraEebiYyT8h7jTRBzojO1QQ115Ld YYSE+Ql5HQOUyxD2hH0frpOnkAODHnPW1q6gRmrkuUefzxAnF4vrxVcu8xIwP8SLEFxVhJoYUVW JG/qJnb4eO257/oVt3WXPsxC40oz8KS4cPQqVhpetX2HeUpv++hcQoWuCaA0JmGjYMK0iVjChSN 4+qqb7qcgpqZn27i7HvfVCIHY3vv0g3VSyW1LT+hX12t2doO7UiSHcx4M0XI56vNbusD94tL2Hr bxQ0vxpbDIrksT0tel62wffFgFs= X-Received: by 2002:a05:600c:e551:b0:4bb:fb24:c508 with SMTP id 5b1f17b1804b1-4bbfb24c6dcmr20233615e9.11.1796566709354; Sun, 06 Dec 2026 06:18:29 -0800 (PST) Received: from localhost ([2001:b07:5d26:7a6a:365a:60ff:fe0d:cfc6]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbf1714d53sm89729635e9.1.2026.12.06.06.18.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Dec 2026 06:18:28 -0800 (PST) X-Mailing-List: linux-doc@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=4be41995a1213b3197a1af467d08c042df15411fbb988756c653c77497ee; micalg=pgp-sha512; protocol="application/pgp-signature" Date: Sun, 06 Dec 2026 15:18:26 +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 v5 00/12] Add f*_xflags_{rw,ro}_mask flags to the fileattr API From: "koraynilay" To: "Amir Goldstein" , "koraynilay" X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261205142411.164484-1-koray.fra@gmail.com> In-Reply-To: --4be41995a1213b3197a1af467d08c042df15411fbb988756c653c77497ee Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Sun Dec 6, 2026 at 3:01 PM CET, Amir Goldstein wrote: > On Sat, Dec 5, 2026 at 3:24=E2=80=AFPM koraynilay w= rote: >> >> This is a follow up patch series stemmed from [1] and [2], splitting the >> _mask change for the fileattr API into its own separate patch series. >> >> The series extends the fileattr API with xflags masks by introducing: >> - fa_xflags_{rw,ro}_mask fields to struct file_attr >> - fsx_xflags_{rw,ro}_mask fields and has_masks / use_masks / get_only_ma= sks >> selectors to struct file_kattr >> - AT_FILEATTR_MASKS at_flag for file_[gs]etattr() >> >> These masks have the following semantics: >> - rw_mask: >> * for filesystems: advertise which xflags they support changing >> * for userspace: specify which xflags it wants to modify >> - ro_mask: >> * for filesystems: advertise which xflags they support only reading >> * for userspace: ignored >> >> This allows userspace to not have to do a RMW cycle when using the >> file_[gs]etattr() syscalls, avoiding possible race conditions and >> simplifying their usage. >> >> The series also introduces the missing FS_XFLAG_PROJID flag so that >> programs like chattr can leverage the new mask API. FS_XFLAG_PROJID is >> kept out of the legacy FSX_FSXATTR_MASK and defined as part of the new >> FSX_FILEATTR_MASK group of xflags that will be used moving forward for >> any new xflag (like the one proposed in [2]). >> >> In addition, FS_XFLAG_COMPR and FS_XFLAG_ENCRYPT are added (as >> FS_COMPR_FL and FS_ENCRYPT_FL counterparts) for fs/ntfs, which is >> converted to the new mask API as an example. Old programs will also get >> these new flags, which should be fine since xflags were made to be >> expandable. >> >> Documentation/filesystems/fileattr.rst explains how this API can be used >> by both userspace and filesystems along with the various semantics (it >> doesn't go into *too much* detail though, since that would mean writing >> the code itself). The rendered page can be found at [4]. >> >> Please also check the specific patch comments. >> >> The series has been tested with custom xfstests [3] (generic/816-835, >> xfs/611, xfs/673) across NTFS, ext4 (project quotas), XFS (project >> quotas and extent size hints), Btrfs, and F2FS. >> Note: these tests were written by gemini and not manually checked, >> before sending them upstream (if needed) I'll have to review/rewrite >> them manually. > > v5 has "conditional RVB" from me on all the patches. > > Good job! Thanks! > I think that for v6 it would be good to upgrade this statement and take > responsibility for the correctness of the test coverage. > > Fully reviewed, fully tested series is a good candidate for merging. > > But also an invitation for more reviewers that arrive late to the party ;= ) Yes, I can do that.=20 >> >> IMPORTANT NOTE: there are quite a few bugs with overlayfs >> (generic/832-835 above) when using a masks filesystem, I haven't >> investigated them deeply yet since I would first need to understand a >> lot more how overlayfs works, but the robot's report is in [5]. >> > > This comment is (hopefully) stale? As far as I understand (aka the bot tells me), for the bugs reported in https://koraynilay.neocities.org/vfs-masks/overlayfs-fileattr-bugs: Bug 1, 2, 4 and 5 reverse direction are fixed. But 3 and 5 forward direction are still present. ("only the mixed-layer copy-up edge case generic/835 remains until overlayfs gets full mask support.") Bug 3 should touch only ovl code, while 5 needs some VFS part too: "So fixing Bug 5 requires a small VFS hook/flag (so stacked filesystems defer mask conversion/validation to inner vfs_fileattr_set() after copy-up) alongside the overlayfs changes." > Thanks, > Amir. > >> To help me develop this patch series I used Gemini 4 Hydrogen/Neon in >> antigravity-cli to audit the code, find edge-cases, propose possible >> fixes, develop and run the tests above and help with >> comments/language/style. > > Thank you for disclosing that. > > On a personal note, since it's hard for people reading that to know, > I would like to say that your work on this series has been an example > of good use of AI tools, with plenty of supervision and personal judgemen= t. > > For fairness, in my review of this series I used AI tools to help me find= bugs, > check bistability and suggest code and wording for some of my comments. > > Thanks, > Amir. Thanks, koraynilay --4be41995a1213b3197a1af467d08c042df15411fbb988756c653c77497ee Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSgVimKafU5DQMcjcDmj22qf5IGXAUCaxVusgAKCRDmj22qf5IG XI1VAP4iAgTL9fP/5sVBAAYRxIL0vYJIHSSVz5sCXJ8fq7QIvAD/WXD56ZWaBCQI Of7gew7EDzHEgc/a6Y0oEa+SDMCSJQM= =sY1v -----END PGP SIGNATURE----- --4be41995a1213b3197a1af467d08c042df15411fbb988756c653c77497ee--