koverstreet / bcachefs

Other
633 stars 69 forks source link

badblocks support #689

Open axet opened 3 weeks ago

axet commented 3 weeks ago

Hello!

Please consider support for bad blocks in bcachefs.

HDD and SSD has SMART for controlling and restoring badblocks on a device. SMART using spare sectors for that purpose but it is a limited resource and eventually will run out which leads to same bad blocks issues are without SMART. It is very unfortunate to throw away a 8TB drive with a 1 bad sectors and 0 spare sectors left.

By adding badblocks support file system can extend HDD life by reducing spare sectors consumption only for most important drive area like first and last MB of the drive and leaving the rest surface as marked bad blocks by file system / kernel . Less spare sectors usage will result longer spare sectors spending and longer HDD life!