diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-11-05 21:53:30 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-11-06 17:00:09 -0800 |
commit | e8ed90a6d9a478938ef967a474a5c2a398759f4d (patch) | |
tree | e731788b50cd8e5619411cec3fd5e479adf45156 /lib/hweight.c | |
parent | bb06664a534ba4833373f19ae018efff91ab2908 (diff) | |
download | linux-e8ed90a6d9a478938ef967a474a5c2a398759f4d.tar.bz2 |
f2fs: keep isize once block is reserved cross EOF
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: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'lib/hweight.c')
0 files changed, 0 insertions, 0 deletions