summaryrefslogtreecommitdiff
path: root/fs/bcachefs/buckets.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-03-19 00:04:52 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-07-14 19:00:14 -0400
commit20ac515a9cc73d48be1462d2a04cda75215a1867 (patch)
tree1da2ee6d3cca8fe11b9b520cc29a1de131a9331f /fs/bcachefs/buckets.c
parent6af91147b6b90552cdf1dd400eeb9da66920f3ce (diff)
bcachefs: bch_acct_rebalance_work
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/buckets.c')
-rw-r--r--fs/bcachefs/buckets.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c
index e4a9bd29e93c..f89e2e9a6dd2 100644
--- a/fs/bcachefs/buckets.c
+++ b/fs/bcachefs/buckets.c
@@ -808,6 +808,15 @@ static int __trigger_extent(struct btree_trans *trans,
return ret;
}
+ if (bch2_bkey_rebalance_opts(k)) {
+ struct disk_accounting_pos acc = {
+ .type = BCH_DISK_ACCOUNTING_rebalance_work,
+ };
+ ret = bch2_disk_accounting_mod(trans, &acc, &replicas_sectors, 1, gc);
+ if (ret)
+ return ret;
+ }
+
return 0;
}