]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: normalize "infinite" retries in error configs
authorEric Sandeen <sandeen@redhat.com>
Tue, 13 Sep 2016 21:51:30 +0000 (07:51 +1000)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 10 Jun 2017 00:25:19 +0000 (17:25 -0700)
commit07cc6bb597cd2db981e329dcf4ab7f8395d9c8c9
tree0d536f9a4d439223a9660d04968488d8d93e8d10
parenta0e423a96fbf5fe93f255eeff991cf90cbfda913
xfs: normalize "infinite" retries in error configs

As it stands today, the "fail immediately" vs. "retry forever"
values for max_retries and retry_timeout_seconds in the xfs metadata
error configurations are not consistent.

A retry_timeout_seconds of 0 means "retry forever," but a
max_retries of 0 means "fail immediately."

retry_timeout_seconds < 0 is disallowed, while max_retries == -1
means "retry forever."

Make this consistent across the error configs, such that a value of
0 means "fail immediately" (i.e. wait 0 seconds, or retry 0 times),
and a value of -1 always means "retry forever."

This makes retry_timeout a signed long to accommodate the -1, even
though it stores jiffies.  Given our limit of a 1 day maximum
timeout, this should be sufficient even at much higher HZ values
than we have available today.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
(cherry picked from commit 77169812739dd800bc3620d781a77c50c75165cc)

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
fs/xfs/xfs_mount.h
fs/xfs/xfs_sysfs.c