4 ms·
> crc is recalculated using corrupted bit Why would it need to recalculate the CRC? The correct CRC (or other hash) for the data is already stored in the metad
by cesarb 2y ago
> crc is recalculated using corrupted bit
Why would it need to recalculate the CRC? The correct CRC (or other hash) for the data is already stored in the metadata trees; it's how it discovered that the data was corrupted in the first place. If it writes back corrupted data, it will be detected as corrupted again the next time.
- amtadt 2y agoBecause CRC is in the on-disk data structure, not in the in-ram data structure. It is stripped upon reading to ram, and created upon writing to disk. That's how bcachefs is designed right now.
- koverstreet 2y agoNo, we carefully carry around existing checksums when moving data. Page cache is a different story, but doesn't apply to what we're talking about here.