This is a note to let you know that I've just added the patch titled f2fs: document: add description about compressed space handling to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: f2fs-document-add-description-about-compressed-space.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 8a86857d41240a18f01b22fa83f2ee6d8bc5777a Author: Chao Yu <chao@xxxxxxxxxx> Date: Tue Apr 13 17:56:53 2021 +0800 f2fs: document: add description about compressed space handling [ Upstream commit 38740707c5bc1253069eb932bc6d244f80ec21f0 ] User or developer may still be confused about why f2fs doesn't expose compressed space to userspace, add description about compressed space handling policy into f2fs documentation. Signed-off-by: Chao Yu <yuchao0@xxxxxxxxxx> Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx> Stable-dep-of: 7e1b150fece0 ("f2fs: compress: fix to avoid redundant compress extension") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/Documentation/filesystems/f2fs.rst b/Documentation/filesystems/f2fs.rst index 4f51c0be22c45..9e302d3dd85a6 100644 --- a/Documentation/filesystems/f2fs.rst +++ b/Documentation/filesystems/f2fs.rst @@ -803,6 +803,14 @@ Compression implementation * chattr +c file * chattr +c dir; touch dir/file * mount w/ -o compress_extension=ext; touch file.ext + * mount w/ -o compress_extension=*; touch any_file + +- At this point, compression feature doesn't expose compressed space to user + 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. Compress metadata layout::