]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs: force unlink metadata updates to disk
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 1 Nov 2018 23:19:15 +0000 (16:19 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 4 Nov 2018 15:23:58 +0000 (23:23 +0800)
In xfs/318 and xfs/325 we inject errors on extent freeing then delete
some files to see if we can make the filesystem go offline.  However,
with the advent of deferred inode inactivation, sync won't guarantee
that unlinked inodes removal is actually pushed to disk since the "inode
needs to be deallocated" state is persisted to disk.  Freeze achieves
this, however, so inject a freeze/thaw cycle to make sure we hit the
injected error.

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>
tests/xfs/318
tests/xfs/325

index 2f2a34b087ecf80841e0b452bf10436f94e1d16e..83b858ea1acb6ec1ee267a46b4c396866e6ca081 100755 (executable)
@@ -59,6 +59,7 @@ _scratch_inject_error "free_extent"
 echo "Remove files"
 rm -rf $SCRATCH_MNT/file1
 sync
+$XFS_IO_PROG -x -c 'freeze' -c 'thaw' $SCRATCH_MNT >> $seqres.full 2>&1
 
 echo "FS should be shut down, touch will fail"
 touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
index 679590157c911b028f2172bea2d1c738620a3f5c..eafb4ae0bfb91ed07576ee8cd1dcdf9f3e987c56 100755 (executable)
@@ -62,6 +62,7 @@ _scratch_inject_error "free_extent"
 
 rm $SCRATCH_MNT/file1
 sync
+$XFS_IO_PROG -x -c 'freeze' -c 'thaw' $SCRATCH_MNT >> $seqres.full 2>&1
 
 echo "FS should be shut down, touch will fail"
 touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch