From 9f07f7a01655513163cb743653dac56570a18baf Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 1 Nov 2018 16:19:15 -0700 Subject: [PATCH] xfs: force unlink metadata updates to disk 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 Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- tests/xfs/318 | 1 + tests/xfs/325 | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/xfs/318 b/tests/xfs/318 index 2f2a34b0..83b858ea 100755 --- a/tests/xfs/318 +++ b/tests/xfs/318 @@ -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 diff --git a/tests/xfs/325 b/tests/xfs/325 index 67959015..eafb4ae0 100755 --- a/tests/xfs/325 +++ b/tests/xfs/325 @@ -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 -- 2.39.5