f2fs: introduce F2FS_IOC_RESERVE_COMPRESS_BLOCKS
authorChao Yu <yuchao0@huawei.com>
Fri, 6 Mar 2020 06:35:33 +0000 (14:35 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 12 May 2020 03:37:12 +0000 (20:37 -0700)
commitc75488fb4d82b697f381f855bf5b16779df440aa
treeac6b83bb0d4c511b543def10047c6d3f4c5b2964
parent34c061ad85a2f5d5e9e3b045d72f3b211db6e282
f2fs: introduce F2FS_IOC_RESERVE_COMPRESS_BLOCKS

This patch introduces a new ioctl to rollback all compress inode
status:
- add reserved blocks in dnode blocks
- increase i_compr_blocks, i_blocks, total_valid_block_count
- remove immutable flag

Then compress inode can be restored to support overwrite
functionality again.

Signee-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/file.c