summaryrefslogtreecommitdiff
path: root/fs/f2fs/compress.c
diff options
context:
space:
mode:
authorDaeho Jeong <daehojeong@google.com>2020-12-01 07:08:02 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2020-12-03 11:11:57 +0300
commit602a16d58e9aab3c423bcf051033ea6c9e8a6d37 (patch)
treeb14640b883fad02423a7ffe06f90607f585a0524 /fs/f2fs/compress.c
parentdb48965264110dd74d1436fc21dac328d04385d2 (diff)
downloadlinux-602a16d58e9aab3c423bcf051033ea6c9e8a6d37.tar.xz
f2fs: add compress_mode mount option
We will add a new "compress_mode" mount option to control file compression mode. This supports "fs" and "user". In "fs" mode (default), f2fs does automatic compression on the compression enabled files. In "user" mode, f2fs disables the automaic compression and gives the user discretion of choosing the target file and the timing. It means the user can do manual compression/decompression on the compression enabled files using ioctls. Signed-off-by: Daeho Jeong <daehojeong@google.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/compress.c')
-rw-r--r--fs/f2fs/compress.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 7ec1592a0973..d23bebb6ccd3 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -944,7 +944,7 @@ int f2fs_is_compressed_cluster(struct inode *inode, pgoff_t index)
static bool cluster_may_compress(struct compress_ctx *cc)
{
- if (!f2fs_compressed_file(cc->inode))
+ if (!f2fs_need_compress_data(cc->inode))
return false;
if (f2fs_is_atomic_file(cc->inode))
return false;