• Eric Sandeen's avatar
    xfs: don't reset b_retries to 0 on every failure · 5539d367
    Eric Sandeen authored
    With the code as it stands today, b_retries never increments because
    it gets reset to 0 in the error callback.
    
    Remove that, and fix a similar problem where the first retry time
    was constantly being overwritten, which defeated the timeout tunable
    as well.  We now only set first retry time if a non-zero timeout is
    set, to match the behavior of only incrementing retries if a retry
    value is set.
    
    This way max retries & timeouts consistently take effect after a
    tunable is set, rather than acting retroactively on a buffer which
    has failed at some point in the past and has accumulated state from
    those prior failures.
    
    Thanks to dchinner for talking through this with me.
    Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
    Reviewed-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
    Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
    
    5539d367
xfs_buf_item.c 33.4 KB