From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796157812; b=rC7j11Ile4oJYnEUcG8U6/bc4pAW2af3Kc0kIHBXk6fH4z4C30CrGOTE/Ency4UCf3sq eqyXDMeAlRUw0JE8DtMTuaWMrEAS0NPQmso93BW60eXiKF0GrtpeIsACFcBh4AoMEviBy cDF5DH39GNoqmZe3lnHjJxahIinh7hyfziGZ6ywe/g5SUI5+y9/VEivfdNE9xtanvehoi M65T+WZtv9xZl+m7vZuJeS1kF9rAlw/zm4zklGhyX2yYJTFDJXa0VGgXBzdSpVJX0t63z cBhiCWItiNBkErZMvzjbP092vDn7eA80MEnyToHlLigbdPqNFG7IAlMPZJI3q6flZXg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796157812; 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=tPgFUf6xrghvM7Rwer+roq5Ujdjh3ntEHevyvYb8Ar/HxiFBE6jZtd4PJWYxaA0qX/5b 8jrGXmp0dRSuoeJ4mGK0HRxYRS7ShFiKf2b0E4WipcQ8rKWkMW0JnmXLDKeXqeiwkSp5z rgvb/SnG+Skf+zAZJk6GaerKC1eN3BuFhE//zIOXLpWDunOacf8L3Tf9dHfp49Sw6g0Uc IgF46TCBlvDxCdL8ToxjGFWxmhLqYR4cYCIzZiZq8YX+3mHagj84ROQc96uJrLFkpLjvd Pp7KiHN9HyaUUG9+m0Ypti2zeHt9nbMUCtRj7PPttv9M+iz5Kfuht5HR3sf54yPSRng== 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.45 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 A0229606A32C for ; Tue, 1 Dec 2026 20:43:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A0229606A32C 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-f45.google.com with SMTP id 2adb3069b0e04-5c3683680edso760198e87.1 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=PjC7R50AGGfEV44ome8a5ExVibSnQ6WgYSUgY9aZsyJWtrAHmAXs4cVYAHnx2dePD/ ve8R55OtpmZO+R25xausL28fALSuJMMdJQpoyyS4isTelOVt+iCxKA+j5/f4qB8a0Kth WNRKwQh2RSv0mFju/jY5osV7aHt02M5JrBvaQ8T1QOmiInogyQKQB9/KM0DJfh28uSqb frVmCJi4AL6WUwRTQxMGu+7H64q6wVauyS8vDtxs9I/2T2ooZLL3WYJrQT8mpyzQO6pe Vfmfvz21V5++wEPnJtRzDnBW54PvxTKljEhw6u8czVo6OvjwylkQZ2I1MhsXRXhH2oSJ z+SA== X-Forwarded-Encrypted: i=1; AL+hErGApj4cHuOTI80VbQFLl3z29l6qB4ji0ldLfzO5BNYzRYDI60icBWyuVtQskQwzDJ3TEpDEGrf7dPUbHVk=@vger.kernel.org X-Gm-Message-State: APuU4Z+rO7sj8ryz8plt3dzFGyG975YSFXc+ZuMhb0VvOoRqPQUYhRg9 qHcH6a61Hn5t5PxnW4OjKj8TpKi9RW9txo6kzw83dIBR5iGu05sELQp5 X-Gm-Gg: AZFdTZchcwaocZ7VH8ozyu6wHSznEUaHAcu/lHYcljcyg/kZjXsZw+PdDQjlkaZVBTr amKL1oZlp9hmXJGhASVaUoHjF+MYev1DguxQsieaFzmoN8pQQNgAdkrWMfjpsGood38/fNDzlXW +NNQn1a+EYhigkERbl1ckall0Dy7bfEdf2SKwsuLizw/ds3YTneaFCpmy4WohgVfYQUjUFtbQty WUEY+Bh2+zMVebrWUEAieN/J5jntyib5FXSK55iIpjYddBEVHoMXtjMDozVYQ28mRJ7+lzBWnwM MaY81ttdSV6wXVrSZ/Cv6iQJsxR60TIl8qooSewVfxpCG7qKQ8biMkQILgJiI9pq+2gYiRS7nub 7saKG9MddsQTRAO0kqQBeR7HEHenKujH3h4kLfdFiIy5KxTNT3CGC+btoq1hwzLk9HYOwh98dn+ 3YkmKsxSgNyVeQvTJxW7i7G2XGGQLSsGQvWsYy6EjE0WNQ186V5d2hVst8SzwGFWV0nMbRn/oFk 6LnF+YZEcS5sNbY23P7ppWKJCBnwNcumnKUPoVRTGrDSm+YwQlM/PqncowYNMy+JqclYpuJiEUQ L+aRMIjyjo5+GAN/ITxsP4ynjgmbpPVMPvRf+nLHnwnsC9gxGG/xkZKkpQMClcwKo2GfnIoOxNb 7VowE+AYWVyjAdQvTsvYCqIAi/4LidE3rAGSfgwn6XQ3yNoQO1Yvry6z5tvrMjCRjdtfOMOdbM+ 4Mpg== 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-kernel@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