On Tue, Aug 11, 2015 at 6:56 AM, Carlos E. R.
On 2015-08-11 00:59, Chris Murphy wrote:
On Mon, Aug 10, 2015 at 12:46 PM, Carlos E. R. <> wrote:
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).
IIRC, initially reiserfs did not, and support was added later. At the time, I think disks did no remapping, or we did not know about it, so it was a problem if the filesystem could not cope with bad sectors.
Yes, but since "ancient" times drive firmware has handled this internally. It does get a bit confusing with AF drives where you must remember to write 8 logical 512 byte sectors in order to cause a write to happen to 1 4096 byte sector. If you only overwrite part of that sector, the driver internally tries to do read, modify, write, and the read fails because the sector is "bad" (or at least ECC fails for it). So you sit there and write to the sector but get back read errors and it doesn't seem to make sense until you realize you need to write a full 4096 byte sector. And bs=4096 changes the seek= value you need to use to write to that sector because any error will report in 512 byte sectors, not 4096 byte sectors. -- Chris Murphy -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org