diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-18 00:13:22 -0500 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-14 19:00:13 -0400 |
| commit | 5668e5deec253dc4674aea00997716cc3a66aaac (patch) | |
| tree | 136d71463926d1cb41d3732c8e48c73d8d3e0146 /fs/bcachefs/disk_accounting.h | |
| parent | 00839addfc771e5653bb9562c5a87cd78eea0eee (diff) | |
| download | linux-5668e5deec253dc4674aea00997716cc3a66aaac.tar.gz linux-5668e5deec253dc4674aea00997716cc3a66aaac.tar.bz2 linux-5668e5deec253dc4674aea00997716cc3a66aaac.zip | |
bcachefs: bch2_verify_accounting_clean()
Verify that the in-memory accounting verifies the on-disk accounting
after a clean shutdown.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/disk_accounting.h')
| -rw-r--r-- | fs/bcachefs/disk_accounting.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/disk_accounting.h b/fs/bcachefs/disk_accounting.h index 76445ffd9172..5132b3dd1745 100644 --- a/fs/bcachefs/disk_accounting.h +++ b/fs/bcachefs/disk_accounting.h @@ -171,7 +171,7 @@ static inline void bch2_accounting_mem_read_counters(struct bch_fs *c, unsigned { memset(v, 0, sizeof(*v) * nr); - struct bch_accounting_mem *acc = &c->accounting[0]; + struct bch_accounting_mem *acc = &c->accounting[gc]; if (unlikely(idx >= acc->k.nr)) return; @@ -201,6 +201,8 @@ int bch2_accounting_read(struct bch_fs *); int bch2_dev_usage_remove(struct bch_fs *, unsigned); int bch2_dev_usage_init(struct bch_dev *, bool); +void bch2_verify_accounting_clean(struct bch_fs *c); + void bch2_accounting_free(struct bch_accounting_mem *); void bch2_fs_accounting_exit(struct bch_fs *); |
