diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-02-23 16:26:10 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-02-23 16:31:28 -0500 |
commit | e81ddd60234e26944c273b61ff3306187d39ef47 (patch) | |
tree | 85739ec4af94acfc2386768e6e01546e59de146e /fs/bcachefs/tier.c | |
parent | 18a307e5f4e68595ab64c89b9696e83a370712f5 (diff) |
bcachefs: track incompressible dataincompressible
Diffstat (limited to 'fs/bcachefs/tier.c')
-rw-r--r-- | fs/bcachefs/tier.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/bcachefs/tier.c b/fs/bcachefs/tier.c index 211a844c69cf..c12b649658b9 100644 --- a/fs/bcachefs/tier.c +++ b/fs/bcachefs/tier.c @@ -23,13 +23,15 @@ static inline bool rebalance_ptr_pred(struct bch_fs *c, struct bch_dev *ca = bch_dev_bkey_exists(c, ptr->dev); if (io_opts->background_target && - !dev_in_target(ca, io_opts->background_target) && - !ptr->cached) + !ptr->cached && + !dev_in_target(ca, io_opts->background_target)) return true; if (io_opts->background_compression && + crc.compression_type != BCH_COMPRESSION_INCOMPRESSIBLE && crc.compression_type != - bch2_compression_opt_to_type[io_opts->background_compression]) + bch2_compression_opt_to_type[io_opts->background_compression] && + crc.compressed_size > c->opts.block_size) return true; return false; |