]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/049: create the nested XFS file systems on the loop device
authorChristoph Hellwig <hch@lst.de>
Fri, 21 Nov 2025 07:10:06 +0000 (08:10 +0100)
committerZorro Lang <zlang@kernel.org>
Fri, 5 Dec 2025 07:46:17 +0000 (15:46 +0800)
Without this I see failures on 4k sector size RT devices, as mkfs.xfs
can't pick up the logical block size on files.  Note that the test
already does this for the nested ext2 image as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/049

index 07feb58c9ad6529f95f6d2cdb05c2ee2ecabf2f2..a3f478fa9351ab7678e84b2cecd6553da1c2a65c 100755 (executable)
@@ -58,7 +58,9 @@ mount -t ext2 $SCRATCH_DEV $SCRATCH_MNT >> $seqres.full 2>&1 \
     || _fail "!!! failed to mount"
 
 _log "Create xfs fs in file on scratch"
-${MKFS_XFS_PROG} -f -dfile,name=$SCRATCH_MNT/test.xfs,size=40m \
+truncate -s 40m $SCRATCH_MNT/test.xfs
+loop_dev1=$(_create_loop_device $SCRATCH_MNT/test.xfs)
+${MKFS_XFS_PROG} -f $loop_dev1 \
     >> $seqres.full 2>&1 \
     || _fail "!!! failed to mkfs xfs"
 
@@ -67,7 +69,6 @@ mkdir $SCRATCH_MNT/test $SCRATCH_MNT/test2 >> $seqres.full 2>&1 \
     || _fail "!!! failed to make mount points"
 
 _log "Mount xfs via loop"
-loop_dev1=$(_create_loop_device $SCRATCH_MNT/test.xfs)
 _mount $loop_dev1 $SCRATCH_MNT/test >> $seqres.full 2>&1 \
     || _fail "!!! failed to loop mount xfs"