mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
generic/530, xfs/501: pass fs shutdown handle to t_open_tmpfiles
So it turns out that overlayfs can't pass FS_IOC_SHUTDOWN to the lower
filesystems and so xfstests works around this by creating shutdown
helpers for the scratch fs to direct the shutdown ioctl to wherever it
needs to go to shut down the filesystem -- SCRATCH_MNT on normal
filesystems and OVL_BASE_SCRATCH_MNT when -overlay is enabled. This
means that t_open_tmpfiles cannot simply use one of the open tempfiles
to shut down the filesystem.
Commit f8f5774722 tried to "fix" this by ripping the shutdown code out,
but this made the tests useless. Fix this instead by creating a
xfstests helper to return a path that can be used to shut down the
filesystem and then pass that path to t_open_tmpfiles so that we can
shut down the filesystem when overlayfs is enabled.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
committed by
Eryu Guan
parent
3fac0b7c31
commit
afeb3b711c
@@ -393,6 +393,17 @@ _scratch_shutdown()
|
||||
fi
|
||||
}
|
||||
|
||||
# Return a file path that can be used to shut down the scratch filesystem.
|
||||
# Caller should _require_scratch_shutdown before using this.
|
||||
_scratch_shutdown_handle()
|
||||
{
|
||||
if [ $FSTYP = "overlay" ]; then
|
||||
echo $OVL_BASE_SCRATCH_MNT
|
||||
else
|
||||
echo $SCRATCH_MNT
|
||||
fi
|
||||
}
|
||||
|
||||
_test_mount()
|
||||
{
|
||||
if [ "$FSTYP" == "overlay" ]; then
|
||||
|
||||
Reference in New Issue
Block a user