From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAF57606A31F for ; Sat, 5 Dec 2026 22:57:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=iCwlg+pi Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4jhkJx6gCkz2y8p; Sun, 06 Dec 2026 09:57:21 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2600:3c0a:e001:78e:0:1991:8:25" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1796511441; cv=none; b=hi7uz1KFN2YQxcZpflA7//CK8rLITt5irH58gY1Bt57SzPNnx1/lOj0njNucUoLro8mXu1uX0fxVGeEiCH613u3dGDFjNST1RCpseDJkTySVIfPQji0vNsb6Fyawp5Que5JwTc9cxbnMoOQJGgFUw0zDsiG1xdw+7peFk0aEh/y8l3S2LcbUEecRhViWFD/ry2grTK0uDmIEuQO+Hg7zAy40KSXw8aRxHHScabEze/yEXCfLdBhdbH+jctpZrSKGA0u9Bggu3nIxlxupK52bm+xXsF2syAa7aS1tdp8SN20K71xGT5e1ZmC1D7PO9xzKgReK7Rf/FyK5dkB+W8kd7Q== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1796511441; c=relaxed/relaxed; bh=qv33qNy7jKKH/DmPTnJCz2PWUWK4eBfASLr68IJTlIo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HMHVk6i2ovaxDH84qr4Gg1LpCFQaW6nKSBcIpBQjOoGiA8zEiDMudAfhebSUPnHPMC3YuN4bBhBgcsOScaMrf/7j9JWkNPtQwvO+BLEe3L5ysFb9yV0bDE0Q8F0FzjqL2gwXGtgIHuNYeXJKjDJzi5A++diNBeh+EOzid4kdJp+zxURujiM2upd3Bw4HxINQYInsxFa4J0PUgOUqkkLHuqTgYu2FIIwRt9Yy1YFC1SUvUafJfuCaWvF4TLVrkrP5wHwbwhmtQF0hfFB9lQS0OfKp2MLMT5kS7q9I64WKaikogRqidlv8KcZQNV765xMYy7vCQIIRfx5eI9jS0Yy0PA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=iCwlg+pi; dkim-atps=neutral; spf=pass (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=xiang@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=iCwlg+pi; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=xiang@kernel.org; receiver=lists.ozlabs.org) Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4jhkJw4J5jz2y8m for ; Sun, 06 Dec 2026 09:57:20 +1100 (AEDT) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 40F0B4044B; Sat, 5 Dec 2026 22:57:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA5081F00A07; Sat, 5 Dec 2026 22:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796511433; bh=qv33qNy7jKKH/DmPTnJCz2PWUWK4eBfASLr68IJTlIo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=iCwlg+pijuiin4gEq32qA4hOI/GbkFPeHZ1Y5QB3G5QUVTkNVYbekWygpvVnF38ej 7sny+uQORgfBQyEd16vdmBnoHBJMerwTajDGce4ENWjGJaR8LMOrJNGemgj/iLcmXK SKXwiiTi9KQk2vWSrRl7BQZZUFN6fAXfl5GntSHJJzmT/09IyaxgHXC3hb0Kn4tFlI +G20/TxLJPPzNZ0HMcsJT4i3X5z1bfyMoSbU3Y4/fajg/EFoNswaudI4qKNLtvULPQ Wv7x8LY5pVqQkc8iaU3HC4TZuh2TgCQWJCyXX7WKHhrmYZT4rGokJ/4bPiepVg8JUO P69hkrUhAEjrw== Date: Sat, 5 Dec 2026 23:57:06 +0100 From: Gao Xiang To: Yifan Feng Cc: Gao Xiang , Chao Yu , Yue Hu , Jingbo Xu , Sandeep Dhavale , Hongbo Li , Chunhai Guo , linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ping Li Subject: Re: [PATCH] erofs: keep the current mount options on remount Message-ID: Mail-Followup-To: Yifan Feng , Gao Xiang , Chao Yu , Yue Hu , Jingbo Xu , Sandeep Dhavale , Hongbo Li , Chunhai Guo , linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ping Li References: <20261205023557.74104-1-evanfengff@gmail.com> X-Mailing-List: linux-erofs@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Subscribe: , , Precedence: list X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20261205023557.74104-1-evanfengff@gmail.com> X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Fri, Dec 04, 2026 at 06:35:57PM -0800, Yifan Feng wrote: > erofs_init_fs_context() fills every new context with the default > options, and erofs_fc_reconfigure() installs them as they are. So a > remount that does not repeat nouser_xattr, noacl, cache_strategy= and > the other options kept in struct erofs_mount_opts resets them, and the > user xattrs that nouser_xattr hid can be read again: > > # mount -t erofs -o nouser_xattr,cache_strategy=disabled /dev/vda /mnt > # findmnt -no OPTIONS /mnt > ro,relatime,nouser_xattr,acl,cache_strategy=disabled > # mount -o remount,noatime /dev/vda /mnt > # findmnt -no OPTIONS /mnt > ro,noatime,user_xattr,acl,cache_strategy=readaround > > mount(8) hides this when it is given the mount point only, because it > then passes the current options again. Before the conversion to the > mount API a remount changed only the options that it named. > > For a remount, start from the options in use. > > Fixes: f57a3fe44995 ("erofs: convert to use the new mount fs_context api") > Signed-off-by: Yifan Feng Reviewed-by: Gao Xiang There was a similar patch but I think your patch is better: https://lore.kernel.org/r/20261118112523.3824782-1-leeonion.muyu@gmail.com I will add a Reported-by credit like: Reported-by: Ping Li Btw, although it's not perfect as Sashiko's pointed out (racy remount, but I don't think anyone really cares), a follow-up patch maybe just introduce a new opt_mask field so that it can mask off unchanged bits in .reconfigure() when updating. Thanks, Gao Xiang