[RFC] Support for Write-and-Verify only drives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

   had anybody considered implementing a toggle switch for the "sd" driver that would send a different write command code, than the standard Write?

   The one I would need instead of Write is the Write-And-Verify and it comes in various control block size flavors of course.

   There are some drives, or more precisely - normal drives with a custom firmware, that simply reject a regular Write - likely as not being good enough for the intended high-rel application - which I can understand, but even after reformatting the drive to no-PI and going to "poor" 512B sector size, they still refuse to do an easy Write operation. I had verified that by using the sg_write_verify (that uses an ioctl) I can really write data to these drives. The reading path is working okay and both dd and hdparm works at expected speeds.

   I had a look in the source code, and it seems that making such change would need just a new binary flag per drive - and the most complicated thing being the actual auto-detection of such an "enhanced to being picky" firmware. Initially I could live with the flag exposed on sysfs, and set it up by an udev based user-space script that activates on drive detection/hot-plug.

   A better one could preset the flag based on model names - but the list will be long and hard to maintain in-kernel, while a try-write,retry-writeverify like auto-detection at first occurrence of a write needs to handle various expected and unexpected errors and I do not see it as a clean thing for the kernel.

   Anyone up to the task?

   Or if I do it myself and send here some patches, what to be aware of?


Daniel





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux