lkml.org 
[lkml]   [2010]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Linux kernel - Libata bad block error handling to user mode program
    I have seen a couple of your posts on this and thought I'd chime in
    since I know a bit about storage.

    I frequently see io errors come through to user space (both read and
    write requests) from usb flash drives, so there is a functioning error
    path there to some degree. When I see the errors, the kernel is also
    logging the sector and eventually resetting the device.

    There is no doubt a disk drive will slow down when it hits a bad spot
    since it will retry numerous times, most likely trying to remap bad
    blocks. Of course your write succeeded because you probably have the
    drive cache enabled. Flush or a full cache hangs while the drive
    retries all of the sectors that are bad, remapping them until finally
    it can remap no more. At some point it probably returns an error if
    flush is timing out or it can't remap any more sectors, but it won't
    include the bad sector.

    I would suggest turning the drive cache off. Then the drive won't lie
    to you about completing writes and you'll at least know which sectors
    are bad. Just a thought :-)

    - Mike


    \
     
     \ /
      Last update: 2010-03-04 18:17    [W:4.465 / U:0.304 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site