compress.c (b28f047b28c51d0b9864c34b097bb0b221ea7247) | compress.c (602a16d58e9aab3c423bcf051033ea6c9e8a6d37) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * f2fs compress support 4 * 5 * Copyright (c) 2019 Chao Yu <chao@kernel.org> 6 */ 7 8#include <linux/fs.h> --- 930 unchanged lines hidden (view full) --- 939 .cluster_idx = index >> F2FS_I(inode)->i_log_cluster_size, 940 }; 941 942 return f2fs_cluster_blocks(&cc); 943} 944 945static bool cluster_may_compress(struct compress_ctx *cc) 946{ | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * f2fs compress support 4 * 5 * Copyright (c) 2019 Chao Yu <chao@kernel.org> 6 */ 7 8#include <linux/fs.h> --- 930 unchanged lines hidden (view full) --- 939 .cluster_idx = index >> F2FS_I(inode)->i_log_cluster_size, 940 }; 941 942 return f2fs_cluster_blocks(&cc); 943} 944 945static bool cluster_may_compress(struct compress_ctx *cc) 946{ |
947 if (!f2fs_compressed_file(cc->inode)) | 947 if (!f2fs_need_compress_data(cc->inode)) |
948 return false; 949 if (f2fs_is_atomic_file(cc->inode)) 950 return false; 951 if (f2fs_is_mmap_file(cc->inode)) 952 return false; 953 if (!f2fs_cluster_is_full(cc)) 954 return false; 955 if (unlikely(f2fs_cp_error(F2FS_I_SB(cc->inode)))) --- 722 unchanged lines hidden --- | 948 return false; 949 if (f2fs_is_atomic_file(cc->inode)) 950 return false; 951 if (f2fs_is_mmap_file(cc->inode)) 952 return false; 953 if (!f2fs_cluster_is_full(cc)) 954 return false; 955 if (unlikely(f2fs_cp_error(F2FS_I_SB(cc->inode)))) --- 722 unchanged lines hidden --- |