
On Mon, Aug 10, 2015 at 12:46 PM, Carlos E. R. <robin.listas@telefonica.net> wrote:
On 2015-08-10 17:42, Greg Freemyer wrote:
Jan, a partial sector write isn't supposed to happen, but you're correct that doesn't mean it doesn't happen.
But when it happens it causes the ECC sector metadata to disagree with the sector contents. When the disk controller reads that sector it verifies the ECC and does it's best to correct the error (assuming it is just a few bits).
When that fails (as in your case), it generates a media error back to the kernel and it also flags the specific physical sector that is corrupt.
But that damage should not be permanent, I suppose. Writing that sector with data should correct it, right?
Transient vs persistent error is determined when the sector is written. If the verify of write succeeds, case closed. If it's transient there's a limit to how many errors are permitted (varies), and if it's persistent it causes that physical sector to be removed, and the LBA to be remapped to a reserve sector where the data is written (verified and succeeds). If there are no reserve sectors remaining, that causes a write error. Different file systems have different ways of dealing with that case, whether a bad sector map is supported or not (recent versions of mdadm do, ext234 has long had such support, XFS and Btrfs do not). -- Chris Murphy -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org