summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/bcachefs.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-02-12 04:48:05 +0100
committerKent Overstreet <kent.overstreet@linux.dev>2024-07-15 01:00:13 +0200
commitfb23d57a6dfc4e521c003dc542799f07d22d269e (patch)
tree0a814ccf2c3c06614f1b2ed0a48950f3a57783e4 /fs/bcachefs/bcachefs.h
parentbcachefs: Kill replicas_journal_res (diff)
downloadlinux-fb23d57a6dfc4e521c003dc542799f07d22d269e.tar.xz
linux-fb23d57a6dfc4e521c003dc542799f07d22d269e.zip
bcachefs: Convert gc to new accounting
Rewrite fsck/gc for the new accounting scheme. This adds a second set of in-memory accounting counters for gc to use; like with other parts of gc we run all trigger in TRIGGER_GC mode, then compare what we calculated to existing in-memory accounting at the end. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bcachefs.h')
-rw-r--r--fs/bcachefs/bcachefs.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h
index b9f5327ab033..33605fa8e70f 100644
--- a/fs/bcachefs/bcachefs.h
+++ b/fs/bcachefs/bcachefs.h
@@ -546,7 +546,6 @@ struct bch_dev {
struct rw_semaphore bucket_lock;
struct bch_dev_usage __percpu *usage;
- struct bch_dev_usage __percpu *usage_gc;
/* Allocator: */
u64 new_fs_bucket_idx;
@@ -741,7 +740,7 @@ struct bch_fs {
struct bch_dev __rcu *devs[BCH_SB_MEMBERS_MAX];
- struct bch_accounting_mem accounting;
+ struct bch_accounting_mem accounting[2];
struct bch_replicas_cpu replicas;
struct bch_replicas_cpu replicas_gc;
@@ -890,7 +889,6 @@ struct bch_fs {
seqcount_t usage_lock;
struct bch_fs_usage_base __percpu *usage;
- struct bch_fs_usage __percpu *usage_gc;
u64 __percpu *online_reserved;
struct io_clock io_clock[2];