diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-03-29 21:46:58 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-03-29 21:50:53 -0400 |
commit | 3e2d5b2b9a45fd185c847f432950f2530171d216 (patch) | |
tree | 9652bf8ca2bf389498af11472e718e60b2402898 /libbcachefs/rebalance.c | |
parent | 7c47145f6cdf9826f9dc24c935195b58268b1ec6 (diff) |
Update bcachefs sources to 0a2abe7ce837 bcachefs: Don't use designated initializers for disk_accounting_pos
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/rebalance.c')
-rw-r--r-- | libbcachefs/rebalance.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libbcachefs/rebalance.c b/libbcachefs/rebalance.c index 10c6a7fd..b9bde04b 100644 --- a/libbcachefs/rebalance.c +++ b/libbcachefs/rebalance.c @@ -95,9 +95,6 @@ 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); } @@ -110,9 +107,6 @@ 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; @@ -606,12 +600,13 @@ void bch2_rebalance_status_to_text(struct printbuf *out, struct bch_fs *c) struct bch_fs_rebalance *r = &c->rebalance; /* print pending work */ - struct disk_accounting_pos acc = { .type = BCH_DISK_ACCOUNTING_rebalance_work, }; + struct disk_accounting_pos acc; + disk_accounting_key_init(acc, rebalance_work); u64 v; bch2_accounting_mem_read(c, disk_accounting_pos_to_bpos(&acc), &v, 1); prt_printf(out, "pending work:\t"); - prt_human_readable_u64(out, v); + prt_human_readable_u64(out, v << 9); prt_printf(out, "\n\n"); prt_str(out, bch2_rebalance_state_strs[r->state]); |