Re:Scripts for Btrfs Maintenance
by londons_explore on Wednesday June 07, 2023 @05:52AM
(#36224848)
Thing is, the drive itself typically is in a much better position to protect against bitrot.
Both SSD's and spinning metal drives have ECC bits stored with the data, and the drive can detect when the data was read easily or required lots of error correction applied. And then based on that they can make the optimal call of how often to read data to see it it is 'nearly rotted' and needs a rewrite.
The filesystem has no knowledge of any of that, so has to do dumb periodic scans.
Both SSD's and spinning metal drives have ECC bits stored with the data, and the drive can detect when the data was read easily or required lots of error correction applied. And then based on that they can make the optimal call of how often to read data to see it it is 'nearly rotted' and needs a rewrite.
The filesystem has no knowledge of any of that, so has to do dumb periodic scans.