Re: [PATCH v2] xfs: don't reset max_atomic_write on a remount without the option
From: Carlos Maiolino
Date: Fri Dec 04 2026 - 05:17:23 EST
On Thu, Dec 03, 2026 at 02:52:01PM -0800, Yifan Feng wrote:
> xfs_fs_reconfigure() applies the max_atomic_write value of the remount
> options whenever it differs from the mounted one, and without the
> option that value is 0, the default. So a remount that does not name
> max_atomic_write resets the limit:
>
> # mount -o max_atomic_write=64k /dev/vda /mnt
> # findmnt -no OPTIONS /mnt
> rw,relatime,inode64,logbufs=8,logbsize=32k,noquota,max_atomic_write=64k
> # mount -o remount,noatime /dev/vda /mnt
> # findmnt -no OPTIONS /mnt
> rw,noatime,inode64,logbufs=8,logbsize=32k,noquota
>
> Start the options of a remount from the value in use, in one block
> with the inode32 setting. A remount with max_atomic_write=0 still goes
> back to the default.
>
> Fixes: 4528b9052731 ("xfs: allow sysadmins to specify a maximum atomic write limit at mount time")
> Signed-off-by: Yifan Feng <evanfengff@xxxxxxxxx>
This doesn't apply to the tree. Rebase and resend...
> ---
> v2: one FS_CONTEXT_FOR_RECONFIGURE block for both inherited options, as suggested by Christoph Hellwig.
> v1: https://lore.kernel.org/r/20261202210828.24694-1-evanfengff@xxxxxxxxx
>
> Applies on top of the inode32 remount patch, https://lore.kernel.org/r/20261130001917.56901-1-evanfengff@xxxxxxxxx . Tested in QEMU with mount(2), mount(8) and fspick()/fsconfig(). fstests -g quick plus 178 remount tests give the same result lists as with v1 (XFS_DEBUG, xfsprogs 6.1.0).
> Found and written with the help of an AI coding assistant.