Re: [PATCH] xfs: don't drop inode32 on a remount without inode32 or inode64
From: Christoph Hellwig
Date: Mon Nov 30 2026 - 08:46:12 EST
On Sun, Nov 29, 2026 at 04:19:17PM -0800, Yifan Feng wrote:
> xfs_fs_reconfigure() compares the mounted state with the options of
> the remount, and those start out as inode64. So a remount that names
> neither inode32 nor inode64 switches an inode32 mount to inode64, and
> new inodes get numbers above 32 bits:
>
> # mount -o inode32 /dev/vda /mnt
> # mount -o remount,noatime /dev/vda /mnt
> # grep /mnt /proc/mounts
> /dev/vda /mnt xfs rw,noatime,inode64,logbufs=8,logbsize=32k,noquota 0 0
>
> 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 the setting changed only when one of the two options was
> given.
>
> Start the options of a remount from the setting in use.
Looks good:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Can you add an xfstests test for this?
I also wonder if we might have similar issues for other mount options.
Do you have spare cycles to look over that?