diff options
author | Fengnan Chang <changfengnan@vivo.com> | 2021-08-09 10:21:04 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-08-17 11:59:04 -0700 |
commit | 4a4fc043f594d39edc976a3a3dce7c40ebb86f3f (patch) | |
tree | 4acf61f6f0d861fbfbff8fa2202d1915a7a38c00 /Documentation/filesystems/f2fs.rst | |
parent | 1927ccdb79906e04c760ed7429c30a5c8054d1a7 (diff) | |
download | linux-4a4fc043f594d39edc976a3a3dce7c40ebb86f3f.tar.bz2 |
f2fs: compress: allow write compress released file after truncate to zero
For compressed file, after release compress blocks, don't allow write
direct, but we should allow write direct after truncate to zero.
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Fengnan Chang <changfengnan@vivo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'Documentation/filesystems/f2fs.rst')
-rw-r--r-- | Documentation/filesystems/f2fs.rst | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/filesystems/f2fs.rst b/Documentation/filesystems/f2fs.rst index 8f251a662542..9b0517d90063 100644 --- a/Documentation/filesystems/f2fs.rst +++ b/Documentation/filesystems/f2fs.rst @@ -865,8 +865,11 @@ Compression implementation directly in order to guarantee potential data updates later to the space. Instead, the main goal is to reduce data writes to flash disk as much as possible, resulting in extending disk life time as well as relaxing IO - congestion. Alternatively, we've added ioctl interface to reclaim compressed - space and show it to user after putting the immutable bit. + congestion. Alternatively, we've added ioctl(F2FS_IOC_RELEASE_COMPRESS_BLOCKS) + interface to reclaim compressed space and show it to user after putting the + immutable bit. Immutable bit, after release, it doesn't allow writing/mmaping + on the file, until reserving compressed space via + ioctl(F2FS_IOC_RESERVE_COMPRESS_BLOCKS) or truncating filesize to zero. Compress metadata layout:: |