From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.48 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796157811; b=4bArTR81EnNpaTKAugTuXEtD8+aOwDbfbW8j0nK2pLdQeupB9N0Jyw5PBLI5Hv5F9hpD xYNLx4x87Ypyj/Cjtp1b8FaLbcC51cMIbDoGZgziTWDO45x5vVoj7CviCZ0Rh/IyqphZk Bo83KOncdsT0K5d57O/wrKCDW/NHpMSITnz7VkWcwArHPVX11wnEpLwaiRq67Mat++zwx dGRYUyP2iu4/C37tPYqaCGNLyfn6vQMPwq86CkwL0HxnegMrq+n9R6pRhwmnXoHkwiAh3 4c087+fiYqISZfcqA0ZtxRv0yT+l6Lq2EjlSUPFMgiHrx1dR1eXhJsngO2pFJghMc7A== 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=WgAA+tGIdUAj4Pu0/Isb97XFbKMxNvXneD5gb2v/rzl+RqAlyvvvtar88aOX73zX0IX9 3XeK6dQrKJX8c0uIvkOtskxaWoiNzRVcJ1eBUiccHVDJcoAsXgefsEfPBSGoSAYhrffsq kOoeID9hafnB+mn/GFJ4f7sT+R3vWLVk9cWV1CI9eaCi4vXiim3oG2J66TzB3R5ZEQicK 5B5tff8jbPcSDATv55sTzbYJtdKb1d2D1OPJyQlD6/5dvPQ0dh6zsPzGmsE0sv//zy+vJ u2MaVYabVknl9z1pwQ0P9H8E39GPFWa1vIb4tUJKn/boDPxKuXJ9HUjYYh7ZelX5WiQ== 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.48 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (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 97217606A327 for ; Tue, 1 Dec 2026 20:43:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 97217606A327 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-f48.google.com with SMTP id 2adb3069b0e04-5c126fa1e3aso1136627e87.2 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=rWPXLymIZe93CLc2H4loqU+pNHyhPENJPvNyQ9fWlE6uhyvO+NVHH8Kck8afI8tgWE N9HjLf0hJesA7szdEPIn4FzwtAHv0TNtgi2IBfqP90SWWkJReBlWyfLD9KxUJi63LqME tk7UYRb9lAN/EVP2W2SOwpawDGWnTO83Fh895x6N+R698ArQtJtn3wqpOx6iSUzRVQ5p FlEiDwYQsoW/yVwdru9IqOH8dHA1Vx83FA9uWbpxwB7lLn9MoWmenoWOo2zq8YW7GcJl zShg5vBmQ92oV0BWjW+XQIgXnHOAxGOkwAxQ/dX1Bm3OjZIDsjNWqJN/o1Pnv/9Y7rJb ecQQ== X-Forwarded-Encrypted: i=1; AL+hErHLh5A8EKzo6IRgtGiLWn2/NZgDqIkyGj2qWxorNoQhd05cCzKcmW1Hhi2vsUFgIdSLZ8vvLEtxQDg=@vger.kernel.org X-Gm-Message-State: APuU4Z921yEIsPi0jzc15amOjM55vG05VMLbDm/eVbuY5HPQg7beaSPc 47PHIT2Fvdu3vJs3sKYi0PhcCYHEzI2vT7x1NaZW37LHjqlPOIVrSCE7 X-Gm-Gg: AZFdTZcvnZvPUT2sOUeWgy9CsJlCcxlpko8H9AgG48Loj7mSNd7TzZrcJVoFH3ggHHO 9dwlbPcVt2XEhikVfCpFypWfnefYQyHqRS4sLsmlODpnuR/9vWUVxrZecdvsSJKXf2sTPa3VEna g+/dJax31hU+ogH+/x49Zfxbn6+tEC9Y/vYRbmQuwoXSITG2mhCpVb295C8LaGjFgPAl+pmm3+K CdiJjDclEo6fvfbETuENX1ZyLrlVvlzoFz44EK+PKrKa7KPW07wE5Pstq6fT1QjY3DUSxpZIRNq X6pGZ72NxCMVIEhsd7w/Eyl//hnkET+vAaC1Fn+lsrr2288fEfQG7I1V6R9p+KTIx8rF/4RJUmx PkS8pFPH9R4aTp+lYEZ0GV3Lm+SkGX/ioaRf3ZNhmj155VBGgmJOXdg5LLdJ1GCNQN7YNEDelYM W2/VSq1kGygv4v60NDyKhvDg5Dnm5NsgEwpJkZYgpBbXY7/Ddn4WmsERtSLlm3uXqnQGHgNp1sA lSeuKeuJgHAuydpaL8yPdYhj8tJVjCuGtEdLtfJGozNMBH5/Xo3KA/1gAbLRjnTUGP/RuAvP2dy d/Q7X4ZGoEEPQ4rHDyDwpdYJd2Q8cCkv7655FKNOF6XY2iWUQK9aGukGulUkuWCqro+OwvccHA3 O3Dl4YMuFJGAQd+Yw70v0JZtVQzvWpmkJmvo/8S0TFg6Kf8Ryk38X+2JrY1wHpAhFWFFa9pGGWD yxvQ== 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-api@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