summaryrefslogtreecommitdiff
path: root/fs/bcachefs/disk_accounting_format.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-02-28 22:37:21 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-07-14 19:00:14 -0400
commit6af91147b6b90552cdf1dd400eeb9da66920f3ce (patch)
tree3d9f5d24b1a060094fbcd95c06ddfd77a93c692e /fs/bcachefs/disk_accounting_format.h
parent6675c37662341cf1a2e3b502a4dafbf7571978b2 (diff)
bcachefs: bch_acct_btree
Add counters for how much disk space we're using per btree. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/disk_accounting_format.h')
-rw-r--r--fs/bcachefs/disk_accounting_format.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/bcachefs/disk_accounting_format.h b/fs/bcachefs/disk_accounting_format.h
index 355b8545df88..057d82c7e0b1 100644
--- a/fs/bcachefs/disk_accounting_format.h
+++ b/fs/bcachefs/disk_accounting_format.h
@@ -101,7 +101,8 @@ static inline bool data_type_is_hidden(enum bch_data_type type)
x(replicas, 2) \
x(dev_data_type, 3) \
x(compression, 4) \
- x(snapshot, 5)
+ x(snapshot, 5) \
+ x(btree, 6)
enum disk_accounting_type {
#define x(f, nr) BCH_DISK_ACCOUNTING_##f = nr,
@@ -134,6 +135,10 @@ struct bch_acct_snapshot {
__u32 id;
};
+struct bch_acct_btree {
+ __u32 id;
+};
+
struct disk_accounting_pos {
union {
struct {
@@ -146,6 +151,7 @@ struct disk_accounting_pos {
struct bch_dev_stripe_buckets dev_stripe_buckets;
struct bch_acct_compression compression;
struct bch_acct_snapshot snapshot;
+ struct bch_acct_btree btree;
};
};
struct bpos _pad;