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 <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Darrick J. Wong
2018-11-01 16:19:15 -07:00
committed by Eryu Guan
parent a0e085215e
commit 9f07f7a016
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -59,6 +59,7 @@ _scratch_inject_error "free_extent"
echo "Remove files" echo "Remove files"
rm -rf $SCRATCH_MNT/file1 rm -rf $SCRATCH_MNT/file1
sync sync
$XFS_IO_PROG -x -c 'freeze' -c 'thaw' $SCRATCH_MNT >> $seqres.full 2>&1
echo "FS should be shut down, touch will fail" echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch
+1
View File
@@ -62,6 +62,7 @@ _scratch_inject_error "free_extent"
rm $SCRATCH_MNT/file1 rm $SCRATCH_MNT/file1
sync sync
$XFS_IO_PROG -x -c 'freeze' -c 'thaw' $SCRATCH_MNT >> $seqres.full 2>&1
echo "FS should be shut down, touch will fail" echo "FS should be shut down, touch will fail"
touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch