|
@@ -399,12 +399,12 @@ static inline int inode_need_compress(struct inode *inode, u64 start, u64 end)
|
|
|
/* force compress */
|
|
|
if (btrfs_test_opt(fs_info, FORCE_COMPRESS))
|
|
|
return 1;
|
|
|
- /* bad compression ratios */
|
|
|
- if (BTRFS_I(inode)->flags & BTRFS_INODE_NOCOMPRESS)
|
|
|
- return 0;
|
|
|
/* defrag ioctl */
|
|
|
if (BTRFS_I(inode)->defrag_compress)
|
|
|
return 1;
|
|
|
+ /* bad compression ratios */
|
|
|
+ if (BTRFS_I(inode)->flags & BTRFS_INODE_NOCOMPRESS)
|
|
|
+ return 0;
|
|
|
if (btrfs_test_opt(fs_info, COMPRESS) ||
|
|
|
BTRFS_I(inode)->flags & BTRFS_INODE_COMPRESS ||
|
|
|
BTRFS_I(inode)->prop_compress)
|