diff mbox series

[2/8] xfs: force unlink metadata updates to disk

Message ID 154111435522.6577.18438780918971479613.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series fstests: fix quota failures on xfs | expand

Commit Message

Darrick J. Wong Nov. 1, 2018, 11:19 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

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>
---
 tests/xfs/318 |    1 +
 tests/xfs/325 |    1 +
 2 files changed, 2 insertions(+)
diff mbox series

Patch

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