#
# Test inode's metadata after fsync or fdatasync calls.
# In the case of fsync, filesystem should recover all the inode metadata, while
-# recovering i_blocks and i_size at least for fdatasync.
+# recovering for fdatasync it should at least recovery i_size.
#
. ./common/preamble
_begin_fstest shutdown auto quick metadata punch
_require_metadata_journaling $SCRATCH_DEV
_scratch_mount
-# This test requires that i_blocks remains unchanged from the start of the
-# check_inode_metadata call until after recovery is complete. fpunch calls
-# turn into pagecache writes if the arguments are not aligned to the fs
-# blocksize. If the range being punched is already mapped to a written extent
-# and alwayscow is enabled, i_blocks will increase by the size of the COW
-# staging extent. This causes stat to report different numbers for %b, which
-# results in a test failure. Hence do not run this test if XFS is in alwayscow
-# mode.
-test "$FSTYP" = "xfs" && _require_no_xfs_always_cow
-
testfile=$SCRATCH_MNT/testfile
# check inode metadata after shutdown
# fsync or fdatasync
if [ $sync_mode = "fsync" ]; then
- stat_opt='-c "b: %b s: %s a: %x m: %y c: %z"'
+ stat_opt='-c "s: %s a: %x m: %y c: %z"'
else
- stat_opt='-c "b: %b s: %s"'
+ stat_opt='-c "s: %s"'
fi
before=`stat "$stat_opt" $testfile`