generic/530, xfs/501: pass fs shutdown handle to t_open_tmpfiles
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 20 May 2019 22:31:04 +0000 (15:31 -0700)
committerEryu Guan <guaneryu@gmail.com>
Fri, 24 May 2019 09:18:16 +0000 (17:18 +0800)
commitafeb3b711cbe1b19d8289ec160bd3950b30e8269
tree3c3c1147fb92ef6514436f72ba53f261a1717940
parent3fac0b7c31bc87bde5c51995e4640dd17f50afcd
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 f8f57747222 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>
common/rc
src/t_open_tmpfiles.c
tests/generic/530
tests/xfs/501