diff options
Diffstat (limited to 'libbcachefs/rebalance.c')
-rw-r--r-- | libbcachefs/rebalance.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbcachefs/rebalance.c b/libbcachefs/rebalance.c index 29a56938..10c6a7fd 100644 --- a/libbcachefs/rebalance.c +++ b/libbcachefs/rebalance.c @@ -95,6 +95,9 @@ static unsigned bch2_bkey_ptrs_need_rebalance(struct bch_fs *c, { struct bkey_ptrs_c ptrs = bch2_bkey_ptrs_c(k); + if (bch2_bkey_extent_ptrs_flags(ptrs) & BIT_ULL(BCH_EXTENT_FLAG_poisoned)) + return 0; + return bch2_bkey_ptrs_need_compress(c, opts, k, ptrs) | bch2_bkey_ptrs_need_move(c, opts, ptrs); } @@ -107,6 +110,9 @@ u64 bch2_bkey_sectors_need_rebalance(struct bch_fs *c, struct bkey_s_c k) if (!opts) return 0; + if (bch2_bkey_extent_ptrs_flags(ptrs) & BIT_ULL(BCH_EXTENT_FLAG_poisoned)) + return 0; + const union bch_extent_entry *entry; struct extent_ptr_decoded p; u64 sectors = 0; |