diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-02-23 16:26:10 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:34 -0400 |
commit | ab05de4ce4a1b806773e59b97a59bcfabba57d8d (patch) | |
tree | 0e5bbbc438c75ae60e126af14a889f26fbc9e93d /fs/bcachefs/rebalance.c | |
parent | 182084e3dc5f55de12f0184ddd6243f64b6cd87b (diff) | |
download | linux-stable-ab05de4ce4a1b806773e59b97a59bcfabba57d8d.tar.gz linux-stable-ab05de4ce4a1b806773e59b97a59bcfabba57d8d.tar.bz2 linux-stable-ab05de4ce4a1b806773e59b97a59bcfabba57d8d.zip |
bcachefs: Track incompressible data
This fixes the background_compression option: wihout some way of marking
data as incompressible, rebalance will keep rewriting incompressible
data over and over.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/rebalance.c')
-rw-r--r-- | fs/bcachefs/rebalance.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/rebalance.c b/fs/bcachefs/rebalance.c index 51defd636c72..a0a75cfa41cb 100644 --- a/fs/bcachefs/rebalance.c +++ b/fs/bcachefs/rebalance.c @@ -30,7 +30,8 @@ static int __bch2_rebalance_pred(struct bch_fs *c, const union bch_extent_entry *entry; struct extent_ptr_decoded p; - if (io_opts->background_compression) + if (io_opts->background_compression && + !bch2_bkey_is_incompressible(k)) bkey_for_each_ptr_decode(k.k, ptrs, p, entry) if (!p.ptr.cached && p.crc.compression_type != |