diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-06 21:42:36 -0500 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-14 19:00:13 -0400 |
| commit | bfcaa9079d91cb843630403e7379bbb86d2f73b0 (patch) | |
| tree | 8f919a7fdff7878c389a744d4eb602315b2ebf39 /fs/bcachefs/disk_accounting.c | |
| parent | 5668e5deec253dc4674aea00997716cc3a66aaac (diff) | |
bcachefs: bch_acct_compression
This adds per-compression-type accounting of compressed and uncompressed
size as well as number of extents - meaning we can now see compression
ratio (without walking the whole filesystem).
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/disk_accounting.c')
| -rw-r--r-- | fs/bcachefs/disk_accounting.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/disk_accounting.c b/fs/bcachefs/disk_accounting.c index 1d45d8280618..3b76b25b5ca2 100644 --- a/fs/bcachefs/disk_accounting.c +++ b/fs/bcachefs/disk_accounting.c @@ -6,6 +6,7 @@ #include "btree_update.h" #include "btree_write_buffer.h" #include "buckets.h" +#include "compress.h" #include "disk_accounting.h" #include "error.h" #include "journal_io.h" @@ -142,6 +143,9 @@ void bch2_accounting_key_to_text(struct printbuf *out, struct disk_accounting_po prt_printf(out, "dev=%u data_type=", k->dev_data_type.dev); bch2_prt_data_type(out, k->dev_data_type.data_type); break; + case BCH_DISK_ACCOUNTING_compression: + bch2_prt_compression_type(out, k->compression.type); + break; } } |
