f2fs: compress: fix to avoid fragment w/ OPU during f2fs_ioc_compress_file()
authorChao Yu <chao@kernel.org>
Mon, 4 Sep 2023 15:12:42 +0000 (23:12 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 12 Sep 2023 20:49:34 +0000 (13:49 -0700)
commit943f7c6f987f4a2bd081e76cf68d4c089dc66c65
tree6e88731d6a0c5719d7543e35a70c8d3169616b40
parenta4639380bbe66172df329f8b54aa7d2e943f0f64
f2fs: compress: fix to avoid fragment w/ OPU during f2fs_ioc_compress_file()

If file has both cold and compress flag, during f2fs_ioc_compress_file(),
f2fs will trigger IPU for non-compress cluster and OPU for compress
cluster, so that, data of the file may be fragmented.

Fix it by always triggering OPU for IOs from user mode compression.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c