* [PATCH] xfs: test that a remount keeps inode32
@ 2026-12-02 21:08 Yifan Feng
0 siblings, 0 replies; only message in thread
From: Yifan Feng @ 2026-12-02 21:08 UTC (permalink / raw)
To: fstests
Cc: Zorro Lang, Christoph Hellwig, Darrick J. Wong, Carlos Maiolino,
linux-xfs, Yifan Feng
A remount that named neither inode32 nor inode64 switched an inode32
mount to inode64. Check the option that /proc/mounts shows after a
remount with an unrelated option and after a read-only/read-write
cycle, and check that remount,inode64 and remount,inode32 still switch
the mode.
Signed-off-by: Yifan Feng <evanfengff@gmail.com>
---
Fails on 7.4-rc4 ("remount,noatime: inode64") and passes with the kernel patch, https://lore.kernel.org/r/20261130001917.56901-1-evanfengff@gmail.com . Asked for by Christoph Hellwig in the review of that patch.
Found and written with the help of an AI coding assistant.
tests/xfs/842 | 44 ++++++++++++++++++++++++++++++++++++++++++++
tests/xfs/842.out | 7 +++++++
2 files changed, 51 insertions(+)
create mode 100755 tests/xfs/842
create mode 100644 tests/xfs/842.out
diff --git a/tests/xfs/842 b/tests/xfs/842
new file mode 100755
index 0000000..fd0365c
--- /dev/null
+++ b/tests/xfs/842
@@ -0,0 +1,44 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2026 Yifan Feng. All Rights Reserved.
+#
+# FS QA Test 842
+#
+# Check that a remount which names neither inode32 nor inode64 keeps the
+# inode allocation mode of the mount.
+#
+. ./common/preamble
+_begin_fstest auto quick mount remount
+
+_fixed_by_kernel_commit xxxxxxxxxxxx \
+ "xfs: don't drop inode32 on a remount without inode32 or inode64"
+
+_require_scratch
+_exclude_scratch_mount_option "inode32" "inode64"
+
+# Remount with one option, then print which of inode32 and inode64
+# /proc/mounts shows.
+remount_and_show()
+{
+ local mode
+
+ _scratch_remount $1
+ mode=$(_fs_options $SCRATCH_DEV | grep -oE 'inode(32|64)')
+ echo "remount,$1: $mode"
+}
+
+_scratch_mkfs >> $seqres.full 2>&1
+_scratch_mount -o inode32
+
+# A remount with an unrelated option keeps inode32.
+remount_and_show noatime
+remount_and_show ro
+remount_and_show rw
+
+# A remount that names inode64 switches to it, and inode64 is kept as well.
+remount_and_show inode64
+remount_and_show relatime
+remount_and_show inode32
+
+# success, all done
+_exit 0
diff --git a/tests/xfs/842.out b/tests/xfs/842.out
new file mode 100644
index 0000000..34e40a1
--- /dev/null
+++ b/tests/xfs/842.out
@@ -0,0 +1,7 @@
+QA output created by 842
+remount,noatime: inode32
+remount,ro: inode32
+remount,rw: inode32
+remount,inode64: inode64
+remount,relatime: inode64
+remount,inode32: inode32
--
2.39.3 (Apple Git-146)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-02 21:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 21:08 [PATCH] xfs: test that a remount keeps inode32 Yifan Feng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.