[lkml]   [2010]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[23/24] libata: retry FS IOs even if it has failed with AC_ERR_INVALID
    2.6.27-stable review patch.  If anyone has any objections, please let us know.


    From: Tejun Heo <>

    commit 534ead709235b967b659947c55d9130873a432c4 upstream.

    libata currently doesn't retry if a command fails with AC_ERR_INVALID
    assuming that retrying won't get it any further even if retried.
    However, a failure may be classified as invalid through hardware
    glitch (incorrect reading of the error register or firmware bug) and
    there isn't whole lot to gain by not retrying as actually invalid
    commands will be failed immediately. Also, commands serving FS IOs
    are extremely unlikely to be invalid. Retry FS IOs even if it's
    marked invalid.

    Transient and incorrect invalid failure was seen while debugging
    firmware related issue on Samsung n130 on bko#14314.

    Signed-off-by: Tejun Heo <>
    Reported-by: Johannes Stezenbach <>
    Signed-off-by: Jeff Garzik <>
    Signed-off-by: Greg Kroah-Hartman <>

    drivers/ata/libata-eh.c | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    --- a/drivers/ata/libata-eh.c
    +++ b/drivers/ata/libata-eh.c
    @@ -1901,8 +1901,9 @@ static void ata_eh_link_autopsy(struct a
    qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_OTHER);

    /* determine whether the command is worth retrying */
    - if (!(qc->err_mask & AC_ERR_INVALID) &&
    - ((qc->flags & ATA_QCFLAG_IO) || qc->err_mask != AC_ERR_DEV))
    + if (qc->flags & ATA_QCFLAG_IO ||
    + (!(qc->err_mask & AC_ERR_INVALID) &&
    + qc->err_mask != AC_ERR_DEV))
    qc->flags |= ATA_QCFLAG_RETRY;

    /* accumulate error info */

     \ /
      Last update: 2010-05-25 00:41    [W:0.031 / U:13.620 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site