From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.54 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796157811; b=ieZPZMBGsthCVZ3Bil0jbISIvE9kNVz/MEtTLCncmLQaRaOvKjq+GZ2VrDejGejGhu4y wY2cAIJAEOBpdhE5W/UzaNCoKJ6VUJyDZL2yxlCGBkd0/8/m0ULNTZviTOimXJonaphIv MK55X0S428XUyoU1fheiaXqA2w8WvSIXacyhp9UWM0Y9tTYr67iYQZjux9KDmGqI1aXz/ Tsyp/QhMQj9kV9oN6zaOSsuCfQyjkex4wkvNxkHDt74tK1ZLNfT+BN6HzfXdCepIIXeFR EU9nYnEpP+mP//jNckJ/10gNc9py1OyBIAwST6OCH0DM3xSM/DUwpqvj/gf7JkO0Tyg== 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=XayB1W0Bb9xjT0CCAVV4jcuDG6oOrBgBq9SbqD2ZqOOVzMIhn8wVfrc+kPynTU3CLE9w G9qpFm0TtVd3c6517rYORVMwuhYEC82Lu2P8hldOcMcpMC8MnjxYeNfZqALVu/wn00Ze6 ezkVIywxtrYa/0juhwUkGb7T7ZKRrYv1cHfveZ5xtQ0lC8OpjJo//VMjkTlDLujxvJ5cr jhVWhDrw5yTL6CnlHhibxFNTlcAWqengt2C3UlSRh7SSSChQohUXg/ahJzLnrF1puU5+e 3R3jUQXsZOf7FeWB6ziUJwskNkaXtVr6s64V5JHLyzAOj8tv1jT4CFUJ1pKAAPgLn+w== 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.54 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 902DB606A320 for ; Tue, 1 Dec 2026 20:43:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 902DB606A320 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-f54.google.com with SMTP id 2adb3069b0e04-5c17ef1e18cso8001836e87.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=smdhnr3U4O+wPGu9iKyApI2zdy34aTVpsfwsNs7PJ8eCkcTJO2G1HvL5QjKrZZpjYH 9V/cKK+ZH0qXVW0UScrcSiAAEaLZgD1qxNRJvj8xbw0z1w1+BTHnPwgB1LrHNdGDP6qx RXzgjpCbkLjOJiDtKDtcJxVms/GC4nhb9A7wzMi5YoNWrTVMDwsMKMQmI8ih/2NrfzVz zAnOdjCzyLEDSIwR6zwwOgCVo/iQredyqPJ6c+PLQja4tiDOPSQ6DXiWlOTEEj6KfcSJ i0GJcJzQxk1EUYC0dUG2PVH/Ms/5RuUUN41ireUHLFtY5rL91i4mAuJ2VwuhgU0RUjwF wjfQ== X-Forwarded-Encrypted: i=1; AL+hErGW6eDcNRFNKH/KRHKnQohboUO1cCYdywZONfxmbONZeUTGxrpUYSmouyioL9xzk+OAfcGzSGrxDj8=@vger.kernel.org X-Gm-Message-State: APuU4Z8PybWr6lEtoiRDbceusFPSIoOC85DrYIUTVKLXwMh2gx350Cis /JnYk7i1x8k1ncFm5QOwstRLYKPVDgHd6niFIEZPrFg8NHbtb3PB51wF+uXc4mz9m7ailg== X-Gm-Gg: AZFdTZdRCTrW5WWidjPhoH8Sf2BstZXwwoAoCid4uKNzNJwekbKx8KC1KOFYWLSDm+R +a5oKk7GthUEH6eukf6jQy8iuht2niqgEinwfaddq7m81jbLjYV/giC9NUxgf30jm9goUgvaCUF DGL1yLCP1hqTc+pIRi0xmvKy9/33fiS1JW7GD6CKlljoXHo8xYMoy8CWRAFVX/p5uFn/bhL5sOX tRQ2ebZP7LfspyY7W0dvjldFq52ShqVy7YcgSZAnzRkjOTn9clO4R0Qs4rqL793wpg/KOjqWoyK 33Pj9tNbVfqVT3hTNlBO6JqxtflEYimaQ0tzPdrEzwF0em+l47XOWb2Y5z5AioaHMNriMPt41mW VRIijCr+8hPmL8ueeDDO3r+iXj/KU35QTEQm5S+07mzMk0hyZWvBMRCkS5QKKkBRLhdk1oVChka 8LAGgtH9VxoGonDyTUspOJPYvHHk1HrJjeB6Iv3o+4WoA1pvByzitEhN1ahPVgZdCLPdAbZUk0c swo7jpd1b/hYssc95TkYrKj8POkePTG3cVuCaIwpLT0JIqB7QL9P4k2VK2q6zqfxjopkfnIFtd+ 0msPEaYClGsqDoTzZSf0Ul88ORm6p80AUm5G5hTYnDWa/Trt2PwO960rCQ/rNhxdZBdclIPiMyg uxjc8oVA3edAXG50dPsC1jF1BA+3CWz1N3RhMMB8sz/MC8BD6hSMul7OYlKEfQY2sPyipRrLQod mAHA== 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-xfs@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