3 ms·
Btrfs does report most of this, tracked per device, and stored in the device tree. `btrfs decice stats`. The counter can be reset. It is a cumulative counter so
by cmurf 5y ago
Btrfs does report most of this, tracked per device, and stored in the device tree. `btrfs decice stats`. The counter can be reset. It is a cumulative counter so if you have one defect and the affected file is read three times, the respective counter increments by three, assuming a persistent error.
https://www.man7.org/linux/man-pages/man8/btrfs-device.8.html https://www.man7.org/linux/man-pages/man8/btrfs-device.8.htm...
Man page includes definitions of the 5 kinds of errors tracked.
The article mentions structural errors. Sounds like this is the detection of an inconsistency. These aren't counted on btrfs, but are logged. Anytime the read or write time tree checker finds a problem, it results in the filesystem going read-only to prevent (further) confusion from ending up on disk. These are exceptionally rare, I've never seen one on any of my filesystems; but have seen it catch things like bitflips due to bad RAM, i.e. the checksum was computed correctly on already corrupted (meta)data.
- cmurf 5y agoActually, I have seen a write time tree checker error on one of my file systems. I even reported the bug :) So it also has the benefit of ratting out btrfs itself when it's the cause. The file system did go read only, corruption didn't make it to disk, and it was fine following a reboot (it was the root file system so I couldn't unmount then mount; and this kinds of confusion can't be cleared with a remount). https://patchwork.kernel.org/project/linux-btrfs/patch/024e44a8e8d1fa7e15eb91c6891bd229b2b4210d.1639481280.git.fdmanana@suse.com/ https://patchwork.kernel.org/project/linux-btrfs/patch/024e4...