mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
generic: check inode metadata on f{data}sync after power-cut
This patch adds case to test fsync and fdatasync with power-cuts. The rule to check is: 1) fsync should guarantee all the inode metadata after power-cut, 2) fdatasync should guarantee i_size and i_blocks at least after power-cut. Note that, in XFS, it allocates more blocks when doing writes, so it should close the file before fsync in order to get actual i_blocks after power-cut. Or, it needs to do truncate the file with a specific size to turn it off at the beginning. Suggested-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
QA output created by 392
|
||||
==== i_size 1024 test with fsync ====
|
||||
==== i_size 4096 test with fsync ====
|
||||
==== i_time test with fsync ====
|
||||
==== fpunch 1024 test with fsync ====
|
||||
==== fpunch 4096 test with fsync ====
|
||||
==== i_size 1024 test with fdatasync ====
|
||||
==== i_size 4096 test with fdatasync ====
|
||||
==== i_time test with fdatasync ====
|
||||
==== fpunch 1024 test with fdatasync ====
|
||||
==== fpunch 4096 test with fdatasync ====
|
||||
Reference in New Issue
Block a user