diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-08-12 02:27:36 -0400 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-08-13 23:00:50 -0400 |
| commit | 58474f76a770bcc79d4b2d7232e4d6650e732b50 (patch) | |
| tree | 483b52bc19698ce56eda1ea003a049161aa8af96 /fs/bcachefs/sb-downgrade.c | |
| parent | 5132b99bb62664c02bd6c0dd62ad3fedc75294d8 (diff) | |
| download | linux-next-58474f76a770bcc79d4b2d7232e4d6650e732b50.tar.gz linux-next-58474f76a770bcc79d4b2d7232e4d6650e732b50.zip | |
bcachefs: bcachefs_metadata_version_disk_accounting_inum
This adds another disk accounting counter to track usage per inode
number (any snapshot ID).
This will be used for a couple things:
- It'll give us a way to tell the user how much space a given file ista
consuming in all snapshots; i.e. how much extra space it's consuming
due to snapshot versioning.
- It counts number of extents and total size of extents (both in btree
keyspace sectors and actual disk usage), meaning it gives us average
extent size: that is, it'll let us cheaply find fragmented files that
should be defragmented.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sb-downgrade.c')
| -rw-r--r-- | fs/bcachefs/sb-downgrade.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/sb-downgrade.c b/fs/bcachefs/sb-downgrade.c index 9f82d497d9e0..650a1f77ca40 100644 --- a/fs/bcachefs/sb-downgrade.c +++ b/fs/bcachefs/sb-downgrade.c @@ -72,7 +72,10 @@ BCH_FSCK_ERR_accounting_key_replicas_nr_devs_0, \ BCH_FSCK_ERR_accounting_key_replicas_nr_required_bad, \ BCH_FSCK_ERR_accounting_key_replicas_devs_unsorted, \ - BCH_FSCK_ERR_accounting_key_junk_at_end) + BCH_FSCK_ERR_accounting_key_junk_at_end) \ + x(disk_accounting_inum, \ + BIT_ULL(BCH_RECOVERY_PASS_check_allocations), \ + BCH_FSCK_ERR_accounting_mismatch) #define DOWNGRADE_TABLE() \ x(bucket_stripe_sectors, \ |
