APFS should support data block integrity

Number:rdar://26909215 Date Originated:2016-06-20
Status:Open Resolved:
Product:OS X Product Version:10.12
Classification: Reproducible:
APFS should support data block integrity. It should be configurable just like encryption: None, Checksum, Parity. It should allow the user or system to mark certain directories with the highest integrity protection (e.g. Photo library) and others with none (caches, tmp, etc).

Checksum would have a lower CPU/storage cost and detect (but not correct) data errors.

Parity would use an ECC to correct some errors, at the cost of greater CPU/storage.

A scrubber process would be able to validate any blocks marked with data integrity when the device is connected to power and not otherwise busy.

Practical real-world experience has shown storage subsystems are not as reliable as some would believe. It isn't even possible for Apple to have statistics on this because with HFS+ the corruption is silent (and silently propagated to backup devices and iCloud too). Even if the underlying storage systems perform parity checks that doesn't protect against driver bugs, memory errors, CPU cache bugs, or even other esoteric errata like cosmic ray strikes.



Steps to Reproduce:

Expected Results:
APFS should support data integrity

Actual Results:

macOS 10.12 Beta 1


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!