From: Yifan Feng <evanfengff@gmail.com>
To: fstests@vger.kernel.org
Cc: Zorro Lang <zlang@kernel.org>, Christoph Hellwig <hch@lst.de>,
"Darrick J. Wong" <djwong@kernel.org>,
Carlos Maiolino <cem@kernel.org>,
linux-xfs@vger.kernel.org, Yifan Feng <evanfengff@gmail.com>
Subject: [PATCH v2] xfs: test that a remount keeps inode32 and max_atomic_write
Date: Thu, 3 Dec 2026 14:52:10 -0800 [thread overview]
Message-ID: <20261203225210.52237-1-evanfengff@gmail.com> (raw)
A remount that named neither inode32 nor inode64 switched an inode32
mount to inode64, and a remount that did not name max_atomic_write
reset that limit to the default. Mount with both options and check
what /proc/mounts shows after a remount with an unrelated option and
after a read-only/read-write cycle. Also check that a remount which
names one of the two options changes that one only.
Signed-off-by: Yifan Feng <evanfengff@gmail.com>
---
v2: also checks max_atomic_write, as suggested by Christoph Hellwig.
v1: https://lore.kernel.org/r/20261202210837.24902-1-evanfengff@gmail.com
On 7.4-rc4 the first line is "remount,noatime: inode64". With the inode32 patch, https://lore.kernel.org/r/20261130001917.56901-1-evanfengff@gmail.com , it is "remount,noatime: inode32". With v2 of the max_atomic_write patch on top the test passes. It is not run where max_atomic_write=64k cannot be mounted (kernels before 6.16, no reflink).
Found and written with the help of an AI coding assistant.
tests/xfs/842 | 49 +++++++++++++++++++++++++++++++++++++++++++++++
tests/xfs/842.out | 8 ++++++++
2 files changed, 57 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..a07aa95
--- /dev/null
+++ b/tests/xfs/842
@@ -0,0 +1,49 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2026 Yifan Feng. All Rights Reserved.
+#
+# FS QA Test 842
+#
+# Check that a remount keeps the inode32 and max_atomic_write mount options
+# when it does not name them.
+#
+. ./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"
+_fixed_by_kernel_commit xxxxxxxxxxxx \
+ "xfs: don't reset max_atomic_write on a remount without the option"
+
+_require_scratch
+_exclude_scratch_mount_option "inode32" "inode64" "max_atomic_write"
+
+# Remount with one option, then print what /proc/mounts shows for the
+# options under test.
+remount_and_show()
+{
+ local opts
+
+ _scratch_remount $1
+ opts=$(_fs_options $SCRATCH_DEV | \
+ grep -oE 'inode(32|64)|max_atomic_write=[^,]*' | xargs)
+ echo "remount,$1: $opts"
+}
+
+_scratch_mkfs >> $seqres.full 2>&1
+_try_scratch_mount -o inode32,max_atomic_write=64k || \
+ _notrun "mount with max_atomic_write=64k failed"
+
+# A remount with an unrelated option keeps both.
+remount_and_show noatime
+remount_and_show ro
+remount_and_show rw
+
+# A remount that names one of them changes only that one.
+remount_and_show inode64
+remount_and_show relatime
+remount_and_show inode32
+remount_and_show max_atomic_write=0
+
+# success, all done
+_exit 0
diff --git a/tests/xfs/842.out b/tests/xfs/842.out
new file mode 100644
index 0000000..6e053c5
--- /dev/null
+++ b/tests/xfs/842.out
@@ -0,0 +1,8 @@
+QA output created by 842
+remount,noatime: inode32 max_atomic_write=64k
+remount,ro: inode32 max_atomic_write=64k
+remount,rw: inode32 max_atomic_write=64k
+remount,inode64: inode64 max_atomic_write=64k
+remount,relatime: inode64 max_atomic_write=64k
+remount,inode32: inode32 max_atomic_write=64k
+remount,max_atomic_write=0: inode32
--
2.39.3 (Apple Git-146)
reply other threads:[~2026-12-03 22:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261203225210.52237-1-evanfengff@gmail.com \
--to=evanfengff@gmail.com \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox