bcachefs: KEY_TYPE_accounting
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 27 Dec 2023 23:31:46 +0000 (18:31 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 14 Jul 2024 23:00:13 +0000 (19:00 -0400)
commit2744e5c9eb1a1090b5f61c955e934c70bfe6b04c
tree5ba22b05e8865c1718b0f405c302a950090e721a
parent929d954330142a6273697b2cbf855f0f904a12f5
bcachefs: KEY_TYPE_accounting

New key type for the disk space accounting rewrite.

 - Holds a variable sized array of u64s (may be more than one for
   accounting e.g. compressed and uncompressed size, or buckets and
   sectors for a given data type)

 - Updates are deltas, not new versions of the key: this means updates
   to accounting can happen via the btree write buffer, which we'll be
   teaching to accumulate deltas.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/Makefile
fs/bcachefs/bcachefs_format.h
fs/bcachefs/bkey_methods.c
fs/bcachefs/disk_accounting.c [new file with mode: 0644]
fs/bcachefs/disk_accounting.h [new file with mode: 0644]
fs/bcachefs/disk_accounting_format.h [new file with mode: 0644]
fs/bcachefs/recovery.c
fs/bcachefs/sb-downgrade.c