Skip to content
  • mckusick's avatar
    Continuing efforts to provide hardening of FFS, this change adds a · ce1bca43
    mckusick authored
    check hash to the superblock. If a check hash fails when an attempt
    is made to mount a filesystem, the mount fails with EINVAL (Invalid
    argument). This avoids a class of filesystem panics related to
    corrupted superblocks. The hash is done using crc32c.
    
    Check hases are added only to UFS2 and not to UFS1 as UFS1 is primarily
    used in embedded systems with small memories and low-powered processors
    which need as light-weight a filesystem as possible.
    
    Reviewed by:  kib
    Tested by:    Peter Holm
    Sponsored by: Netflix
    ce1bca43