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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 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




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux