> > Hi, > > > > In a Mass Storage Device, if a physical block is damaged, and one or > > more logical blocks are lost, must the device remap the logical blocks > > to different addresses? What are the alternatives(you might not have > > more spave in the physical memory). > > The device is not obliged to do anything when a block is damaged. But if > you want to remap the block, that will make your device more reliable. > Especially if you are able to save the data by remapping before the old > block has failed completely.
I simulated a block error doing this: when the host tries to read one specific logical block, I change some bytes. The I try two things: 1) Just returns the number of bytes the host expects and finish with no erros. The host just reports I/O error and doesnt take any other action. 2) Detect the error, stall bulk-in and report a command failed. As sense data i return usb-storage: -- code: 0xf0, key: 0x3, ASC: 0x11, ASCQ: 0x0 usb-storage: Medium Error: Unrecovered read error It seems like the host should ignore the damaged logical block, but that isnt done. > > Of course if there's no more space available then you can't remap the > block. > > Alan Stern > > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel