• Kent Overstreet's avatar
    bcachefs: Disk accounting device validation fixes · 19773ec9
    Kent Overstreet authored
    - Fix failure to validate that accounting replicas entries point to
      valid devices: this wasn't a real bug since they'd be cleaned up by
      GC, but is still something we should know about
    
    - Fix failure to validate that dev_data_type entries point to valid
      devices: this does fix a real bug, since bch2_accounting_read() would
      then try to copy the counters to that device and pop an inconsistent
      error when the device didn't exist
    
    - Remove accounting entries that are zeroed or invalid: if we're not
      validating them we need to get rid of them: they might not exist in
      the superblock, so we need the to trigger the superblock mark path
      when they're readded.
    
      This fixes the replication.ktest rereplicate test, which was failing
      with "superblock not marked for replicas..."
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    19773ec9
sb-errors_format.h 13.8 KB