• Kent Overstreet's avatar
    bcachefs: bcachefs_metadata_version_disk_accounting_inum · 58474f76
    Kent Overstreet authored
    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: default avatarKent Overstreet <kent.overstreet@linux.dev>
    58474f76
bcachefs_format.h 38.6 KB