From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796157811; b=PB4RzlY4xVlbObJdhI3Ca8ErI9sUEBk8azVZmtGTi4dE1YDA8+8JtilU1aSL5YXTK5l2 3ouKuQ1bs+aCYULUZo6qD/BhsoFvURDi+fs/BI+UhslnB9SAOJVeBqoZbqnRjfVFELLrf tIOR1cpYa1ojIeg6+DJwZTzidnEI40kUxJc1+jKYw6LLmKYqJ6Jmz5RAlF9VA2W7uEtcb KjzOjPoa/g5agNMYeQHflUxGNUty0I33FCkNIq8i44ucuogBEtQ9NSFObJB7Dd5KkZiy0 XRmp8aMJIK7/S+pmBSdfvSgYyk4KlsFRJabljCZ8BYODURuYKzvsUGUNuKaNc+LlBIg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796157811; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=ljEH4LBSPD8Lyh020yl6N+tZfH7lJcocddmBb8Qn/qU=; b=DusYlDjmDiSgxGhEDsOYAC/0L60zErGWBzt4iwmU0mA6Gj77v6juUw0he0N9m+rNETg/ BKoInCbB9O+B3jM3OTlUZfOX3cW7QIxdfgBpKTKdTm8U8rSS2W7KC0EjKCjurt9yPReeZ m5qqpxrQ0bdli00EEiOb0IV8eGMiQzGWDDIYfDf41XO2Dn1GYBiV0qz+dzo0KrbNWHCn9 G7PWXO5b0HkABvfSeZGrIRMJGdIRn6hBFk8nTQds1LixjSEOwOcw44lWn8O6Vv8S3u84+ peNTj7PEKa8LgWecVGLhSGe1GQ5+dcw0crceBsLMbQQQ5i1BBF7xL/v0HdKVpPgBD5g== 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="LXOg/B8K"; arc=none smtp.remote-ip=209.85.167.41 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 97041606A322 for ; Tue, 1 Dec 2026 20:43:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 97041606A322 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=LXOg/B8K Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-5c17ef1e18cso8001835e87.0 for ; Tue, 01 Dec 2026 12:43:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796157810; x=1796762610; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ljEH4LBSPD8Lyh020yl6N+tZfH7lJcocddmBb8Qn/qU=; b=LXOg/B8KmEnh9Yk3RsENDVrRSiNZ5vnALY259fefQq06XuWTkpsPcYazucWSg+7prp q7kJ4Mz7FIkyHiDfDuzMQ7zIb4oTYs6O7JO3PYlVe4mSTvHzjwkwtuZcJ5CrTfa/DxZr 1hHBLfgMyvbxtczfuUukaYdxRL47+9jUpx4aunD2Cl8wv+Y0ypbmfB7qYIvCaTjbPOd5 qSWFT9ECU3XGsHv9ErPACNVYTqXjX1fwsYTfsHhCappXcDrCLxQHsb7HsJZhlA2FK9Ly 6sP5350TF0F6lw4hrzIkX7OFUonGsXyfFsCUKWW0PUb+38lI/a2sgujoARwPbS2Hok5u bZ1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796157810; x=1796762610; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=ljEH4LBSPD8Lyh020yl6N+tZfH7lJcocddmBb8Qn/qU=; b=S+qLK6EoNf6veq11NSfl+IRFHWKRQS14kkGumA2skjhcedTrNaGGXks91KZoloF4uJ 4+eTVJFAMMKz1tisMyq2UqF6UWUtL3KGCWLiFmfJww/U6VZiOO5yavVhsEInXqUNTrFt MV5oMy1EK2rpCNcQbtpNCn/sTYr/v63x1kI/oIvcGzXBAAWUq1/4RvK/RHds9z0UMSvs +a75gGzKZa+SVRuUyKGGiUyX9v+JV5m8kBMzU3yXxnNq4eYB21Zr9Paq31x7gmijPbKx vXbVlJP3GwQ++lbG+nzgaB7LB1/5QT698o+HqOHONek904IiooPr2TxMzs7IHyf2eLi2 nymg== X-Forwarded-Encrypted: i=1; AL+hErFYm/W4rzVCCmMF80c3KhgVZu5iLlVLlZrpjmh4mDMUeQg9tgeabf0rkiE/KtzwvKgpKk7bNJrip24=@vger.kernel.org X-Gm-Message-State: APuU4Z9I71sUrOyu1KycBVZxZnlIqWjFG3Ma4INAyQuMXv1T2m4uwZO9 swTfpo4mshPV8CVy08jn0/NeOFjCELbptLN5XrQ/QsQCZyPILocE9277 X-Gm-Gg: AZFdTZdtO2F24EyK8EVIdcEqwxLGWol7E9KL1Z+QwdkNdYRQJjttlZUNF3j1Qx3xYjC CCfpsAPEX7wX12IT+HbLa/B2u4807PFcQapeuB9y/LLD6HnG2B6OamQQYhKPgd+VZz9bAvqEHsr qnBzc/Ij41LqbnpF6uYSTvjaMOH1XqwGVNVm4aGqJ/dwYwxxkxHVaefQZZ3LYBlQgPS3Q2PhDUE ySoT5GF0maFhVQ1gxCVtCI3+7qN3lgUR67GL32rqt0WLFTdK6ZsBr9XnjgSqnEwWIfK25MbAlAE z9dAxdpWzTJlw/RanPByENbQ3IO8EXaA3WhlFkg3iqEmTc9GHVzXJvlu8ZAKGb7t4oXD8VhRWiL du255l9vF9YSk3uzz7fCxFqa6zq7izeHuvc0jVqnkwYkypdi3XQkOp7TXfGtvrPLF5BEXV4w0FU FGmoaH1paxSKAziwIF+x2+mUf6Yq2Wp3ctUnZFK58YN1AXG/HP88xLg+werDAbk4XWQBmwUSnUA UVUxS22n7oxT+r1qMBN/c12cncwoIAJn4qKONTBAshS77qROiC6Q50uRkLhWvuWDoDacqoAmi7u L/uZ4Ot8CqF1uERyRWIpqGAUFBUeXECZADKQKbA2JpASbSFCuj9eAJx/X38wRVVluzn+ilwQh1Y kTrt5qy10ZFdLCGexWV0GCDXeXdnRzRa/HOoBE9oc5DjfFVSnrK3Rl4nS1vw+0M3eROBRq7C6KD Eyxw== X-Received: by 2002:a05:6512:1315:b0:5c1:5974:8a54 with SMTP id 2adb3069b0e04-5c1bc6f6f1bmr10921757e87.5.1796157809565; Tue, 01 Dec 2026 12:43:29 -0800 (PST) Received: from Lauri-G-Pro-14-M4.intra.lakuz.com (n2vuxegclodz2eptmkr-1.v6.elisa-laajakaista.fi. [2001:99a:2ab:bb00:9cc7:5f2e:4be8:a88b]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5c1bd064420sm9195357e87.71.2026.12.01.12.43.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 01 Dec 2026 12:43:29 -0800 (PST) From: Lauri Gates To: Amir Goldstein Cc: koraynilay , 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=20Roh=C3=A1r?= , Christoph Hellwig , Dave Chinner , linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, ntfs@lists.linux.dev, linux-nfs@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, linux-unionfs@vger.kernel.org Subject: Re: [PATCH v3 2/5] vfs: add xflags masks to fileattr API Date: Tue, 1 Dec 2026 22:43:28 +0200 Message-ID: <20261201204328.30892-1-lauri.gates@gmail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: 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-Transfer-Encoding: 8bit On Mon, Nov 30, 2026 at 10:04 PM Amir Goldstein wrote: > However, a filesystem can only report a new flag after it has opted > into masks, so if a new flag requires converting many filesystems, > it may not be realistic to maintain the freeze rule. For writable flags the freeze rule may hold if a filesystem can set has_masks without first giving every FS_*_FL flag an xflag. The FS_IOC_SETFLAGS fallback from my first mail does that. With it, an FS_IOC_SETFLAGS call that changes a flag with no xflag (DIRSYNC, NOTAIL, ...) reaches the filesystem as the full read-modify-write request it got before masks. Every other set call becomes a masked request, as in v3. With the fallback, ocfs2 sets has_masks with only its five xflags, and all six of its other FS_IOC_SETFLAGS flags still set and clear. A new writable flag then needs only the masked ->fileattr_set() of each filesystem that adds it. That filesystem sees which flags the caller named, so it can tell a change from a bit the VFS carried over, which a get_only_masks filesystem, fed read-modify-write requests, cannot. My last mail said get_only_masks lets the may-share series drop the fallback. For read-only flags it does; for writable ones the fallback still seems needed. Could v4 take the fallback alongside get_only_masks? On top of your diff its condition becomes "fs_has_masks && !(...)" in fileattr_set_convert(). With both applied and ocfs2 setting has_masks, not get_only_masks, all my checks pass, including the six ocfs2 FS_IOC_SETFLAGS flags; without the fallback those six fail with EOPNOTSUPP. Tree: v7.4-rc1, v3 1-3, your diff (zero rw_mask returning -EINVAL as in your tree), the mask_to_rmw line from my last mail, the fallback and the rest of the may-share series; x86_64 under QEMU. Thanks, Lauri