From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796511433; b=Br+auVTjedZVdXqnI9xJCh5A1lVVxy4ev8hPW6EQv2Yi5tV/B8s1F3J/zO/9FTQJpYyH Pz4mZkwpcf++waq3pPKxV1+JZeHdueIk48gflF3YDbIyEHxS7Wm1AaOXD/aGrnbTAm24T jNAGeQL4w2hq/0KzXIoJ5vm6lMAuw1zMVXY/JiHht/aoKhW+OGD1PlwU4eG0fwedPlSy3 wx6CajQnMz+6xJY0f+sSH/i9PrbBHvv4MPX5R9ZTnpgUvbUZ5gmR9DKOpzkoNwyBny+Qq F358z7VcfTG8XH7HmYhB+U4invyXfY4Nd+Epfzgrn3iaPGUN+9AqmJPCBLWAApQkEzA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796511433; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=qv33qNy7jKKH/DmPTnJCz2PWUWK4eBfASLr68IJTlIo=; b=Yxln16Nq2GE3I63WPjic+cqaEx0AqGShzckbybDB6ImUxid9YY47IXBthucDe0RBP9fu QMZcYn9PqGjJHA8xZkKupyEu7FKPbJa2LR7Cxo9siZxPQpks/3viwyAbnXUYPBe9keop3 9kUM2JQmW5w4KSCOBFniVo8Y4kI8eZlV+xBP60As4YwldymmWStdXSaP3SCkUnsAseYpd yk5kIBfB0GTO+UO8bIRxRfjjmkaVJjh02IpO5zWlvlj+QvMmh9o4yjdA4How1xxJ+D5ju h6Zdoz/ZsZFBzvBH13g6p4Z/2PorxRXeZ3xVJvHw+df+uLMBMWBcikjmd1tEn8wL/Lw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=iCwlg+pi; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E2D9606A31F for ; Sat, 5 Dec 2026 22:57:13 +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: 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-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20261205023557.74104-1-evanfengff@gmail.com> 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