generic: add testcase to test fallocate & f{data,}sync
authorChao Yu <yuchao0@huawei.com>
Wed, 15 Nov 2017 08:58:33 +0000 (16:58 +0800)
committerEryu Guan <eguan@redhat.com>
Wed, 15 Nov 2017 09:40:07 +0000 (17:40 +0800)
commiteb48c305021f4d233075b2b899a289c8aa34998b
tree59f7372fea28717f5f77eee5da6d1a905845c53e
parent742facac0d331819b2b94e5a07379eddb612bc8b
generic: add testcase to test fallocate & f{data,}sync

f2fs can skip isize updating in fsync(), since during mount, f2fs
tries to recovery isize according to valid block address or
preallocated flag in last fsynced dnode block.

However, fallocate() breaks our rule with setting
FALLOC_FL_KEEP_SIZE flag, since it can preallocated block cross EOF,
once the file is fsynced, in POR, we will recover isize incorrectly
based on these fallocated blocks.

This patch adds a new testcase to test fallocate, in order to verify
whether filesystem will do correct recovery on isize.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/468 [new file with mode: 0755]
tests/generic/468.out [new file with mode: 0644]
tests/generic/group