* lots of mounts/remounts of the test file system?
@ 2025-07-22 7:19 Christoph Hellwig
2025-07-29 14:29 ` Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2025-07-22 7:19 UTC (permalink / raw)
To: fstests
Hi all,
I've been hacking on some (XFS) code that in this state of development
requires a mount options to be passed for every mount, and I noticed
that even when running without a SCRATCH_DEV I have to add the required
option to MOUNT_OPTIONS and not just TEST_FS_MOUNT_OPTS, which is a bit
odd. I've been trying to track it down and despite multiple attempts
failed to find my way through the bash code for it.
But what is even more odd is that when running just a single test (e.g.
generic/001), the test fs gets mounted four times, with the second
and fourth time failing to apply the mount options.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: lots of mounts/remounts of the test file system?
2025-07-22 7:19 lots of mounts/remounts of the test file system? Christoph Hellwig
@ 2025-07-29 14:29 ` Darrick J. Wong
2025-07-31 10:21 ` Zorro Lang
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2025-07-29 14:29 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: fstests
On Tue, Jul 22, 2025 at 12:19:34AM -0700, Christoph Hellwig wrote:
> Hi all,
>
> I've been hacking on some (XFS) code that in this state of development
> requires a mount options to be passed for every mount, and I noticed
> that even when running without a SCRATCH_DEV I have to add the required
> option to MOUNT_OPTIONS and not just TEST_FS_MOUNT_OPTS, which is a bit
> odd. I've been trying to track it down and despite multiple attempts
> failed to find my way through the bash code for it.
>
> But what is even more odd is that when running just a single test (e.g.
> generic/001), the test fs gets mounted four times, with the second
> and fourth time failing to apply the mount options.
Huh, I observe the same thing. I wonder why it does that, but bash is
pretty awful for tracing and there's no obvious explanation. :(
--D
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: lots of mounts/remounts of the test file system?
2025-07-29 14:29 ` Darrick J. Wong
@ 2025-07-31 10:21 ` Zorro Lang
0 siblings, 0 replies; 3+ messages in thread
From: Zorro Lang @ 2025-07-31 10:21 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Christoph Hellwig, fstests
On Tue, Jul 29, 2025 at 07:29:51AM -0700, Darrick J. Wong wrote:
> On Tue, Jul 22, 2025 at 12:19:34AM -0700, Christoph Hellwig wrote:
> > Hi all,
> >
> > I've been hacking on some (XFS) code that in this state of development
> > requires a mount options to be passed for every mount, and I noticed
> > that even when running without a SCRATCH_DEV I have to add the required
> > option to MOUNT_OPTIONS and not just TEST_FS_MOUNT_OPTS, which is a bit
> > odd. I've been trying to track it down and despite multiple attempts
> > failed to find my way through the bash code for it.
> >
> > But what is even more odd is that when running just a single test (e.g.
> > generic/001), the test fs gets mounted four times, with the second
> > and fourth time failing to apply the mount options.
>
> Huh, I observe the same thing. I wonder why it does that, but bash is
> pretty awful for tracing and there's no obvious explanation. :(
I tried to run generic/001 on xfs, then I got below dmesg output:
->[2252223.939937] XFS (sda5): Mounting V5 Filesystem 364c2734-5bec-4d6a-8057-6ced2ea53e95
[2252223.963840] XFS (sda5): Ending clean mount
[2252224.892093] XFS (dm-3): Mounting V5 Filesystem 1de154c4-41cd-4b49-a09c-a55532f58ee9
[2252224.910117] XFS (dm-3): Ending clean mount
[2252224.950702] XFS (dm-3): Unmounting Filesystem 1de154c4-41cd-4b49-a09c-a55532f58ee9
[2252226.047099] XFS (sda5): Unmounting Filesystem 364c2734-5bec-4d6a-8057-6ced2ea53e95
->[2252226.168554] XFS (sda5): Mounting V5 Filesystem 364c2734-5bec-4d6a-8057-6ced2ea53e95
[2252226.190181] XFS (sda5): Ending clean mount
[2252226.208104] run fstests generic/001 at 2025-07-31 17:18:04
[2252230.614153] XFS (sda5): Unmounting Filesystem 364c2734-5bec-4d6a-8057-6ced2ea53e95
->[2252230.755666] XFS (sda5): Mounting V5 Filesystem 364c2734-5bec-4d6a-8057-6ced2ea53e95
[2252230.776979] XFS (sda5): Ending clean mount
[2252230.820463] XFS (sda5): Unmounting Filesystem 364c2734-5bec-4d6a-8057-6ced2ea53e95
Some lines are outputed before "run fstests generic/001", some lines after it.
------
Before that line, my testing (./check generic/001) tried to mount TEST_DEV (sda5) twice,
tried to mount SCRATCH_DEV (dm-3) once. Let's focus on TEST_DEV. By enable bash
DEBUG_XTRACE (bash -x) in check and generic/001, I found these two places which
mount $TEST_DEV in check:
1) _test_mount
2) _check_test_fs -> _check_xfs_filesystem -> _mount_or_remount_rw
------
------
After that line, my testing tried to mount TEST_DEV once, that comes from:
1) _check_filesystems -> _check_test_fs
------
So the "_check_xfs_filesystem" set ok=1 by default, then does $XFS_REPAIR_PROG,
and set ok=0 if it returns non-zero. Then if "ok isn't 0 and type=xfs", calls
_mount_or_remount_rw to mount. This generates extra mount operations.
Thanks,
Zorro
>
> --D
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-31 10:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22 7:19 lots of mounts/remounts of the test file system? Christoph Hellwig
2025-07-29 14:29 ` Darrick J. Wong
2025-07-31 10:21 ` Zorro Lang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox