]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: don't reset b_retries to 0 on every failure
authorEric Sandeen <sandeen@sandeen.net>
Wed, 20 Jul 2016 00:54:09 +0000 (10:54 +1000)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 10 Jun 2017 00:25:18 +0000 (17:25 -0700)
commita0e423a96fbf5fe93f255eeff991cf90cbfda913
tree81069b18b7884f390ed96f0333c1034f248565ee
parente17a1808c64f5bf257d2069abebec15030cda2e8
xfs: don't reset b_retries to 0 on every failure

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: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
(cherry picked from commit 5539d36752eb789f4067a9f88e72177895d56317)

Orabug: 26130728

Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
fs/xfs/xfs_buf_item.c