• Chao Yu's avatar
    f2fs: keep isize once block is reserved cross EOF · e8ed90a6
    Chao Yu authored
    Without FADVISE_KEEP_SIZE_BIT, we will try to recover file size
    according to last non-hole block, so in fallocate(), we must set
    FADVISE_KEEP_SIZE_BIT flag once we have preallocated block cross
    EOF, instead of when all preallocation is success. Otherwise, file
    size will be incorrect due to lack of this flag.
    
    Simple testcase to reproduce this:
    
    1. echo 2 > /sys/fs/f2fs/<device>/inject_type
    2. echo 10 > /sys/fs/f2fs/<device>/inject_rate
    3. run tests/generic/392
    4. disable fault injection
    5. do remount
    Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    e8ed90a6
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
acl.c Loading commit data...
acl.h Loading commit data...
checkpoint.c Loading commit data...
data.c Loading commit data...
debug.c Loading commit data...
dir.c Loading commit data...
extent_cache.c Loading commit data...
f2fs.h Loading commit data...
file.c Loading commit data...
gc.c Loading commit data...
gc.h Loading commit data...
hash.c Loading commit data...
inline.c Loading commit data...
inode.c Loading commit data...
namei.c Loading commit data...
node.c Loading commit data...
node.h Loading commit data...
recovery.c Loading commit data...
segment.c Loading commit data...
segment.h Loading commit data...
shrinker.c Loading commit data...
super.c Loading commit data...
sysfs.c Loading commit data...
trace.c Loading commit data...
trace.h Loading commit data...
xattr.c Loading commit data...
xattr.h Loading commit data...