Hi Clemens, On Sun, 2015-12-20 at 19:34 +0100, Clemens Eisserer wrote: > Hi Vyacheslav, > > > > But I suppose that eMMC or SSD will do re-assignment of bad logical > > sector into valid physical page on write operation. And I am not sure > > that bad sector will be re-assigned on write operation for HDD case. > > Modern (SMART-capable) HDDs behave exactly the same - they have spare > sectors and remap bad sectors when writing them. I "fixed" a laptop > HDD once, which had a head-crash at the place where ext4's journal was > located - a simple overwrite with dd fixed the drive. > Yes, such remapping technology should exists for HDD too. But HDD opportunity for remapping of bad sectors is more limited because you cannot reserve significant amount of spare sectors. Available free space is really important feature. Maybe it is possible to compare a size of SSD's overprovisioning and HDD's reserved spare sectors space. But SSD's FTL is able to use any NAND erase block for remapping. And I suppose that HDD's reserved spare sectors space is simply special contiguous area of sectors. So, I think that probability to exhaust HDD's reserved spare sectors is more higher for HDD case. It means that probability to encounter write error because of impossibility to remap bad sector is more higher for HDD case, from my point of view. Another bad thing with using dd for cleaning some bad sectors is impossibility to distinguish what you try to rewrite. Because you try to rewrite as user data as metadata. Zeroing some space in ext4 journal is not very critical action. You will simply lose one or several transaction in the journal. It means that the file system will be in consistent state anyway. You could lose some user data. But if you try to rewrite by means of dd some arbitrary sector into file system volume then consequence of such action is hard to forecast. So, the best way is to track and to process the occurrence of unrecoverable read error on file system side. Thanks, Vyacheslav Dubeyko. -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html