From: Andrew Deason Date: Tue, 28 Jan 2014 00:03:59 +0000 (-0600) Subject: afs: Translate VNOSERVICE to ETIMEDOUT X-Git-Tag: upstream/1.6.8^2~50 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4e7e1d0c4b8dfb70b48ea20837f6657a2bce2184;p=packages%2Fo%2Fopenafs.git afs: Translate VNOSERVICE to ETIMEDOUT Some fileservers will kill calls that are taking too long with the VNOSERVICE abort code. Our logic for retrying calls is already aware of this usage, but if we cannot retry the call, we still just return VNOSERVICE as an error code to our caller. Don't return this raw, since has the same value as ENOBUFS, which can cause a confusing error message from logs or applications ("No buffer space available"). Return ETIMEDOUT instead. Reviewed-on: http://gerrit.openafs.org/10766 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason (cherry picked from commit 335a70653adb59795f262663af3972de016c068d) Change-Id: Ia0b4dbfb61353c08917898c3cb9128625023f311 Reviewed-on: http://gerrit.openafs.org/10814 Reviewed-by: Perry Ruiter Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand --- diff --git a/src/afs/afs_error.c b/src/afs/afs_error.c index a570f9c0d..a2a42c04d 100644 --- a/src/afs/afs_error.c +++ b/src/afs/afs_error.c @@ -289,6 +289,9 @@ afs_CheckCode(afs_int32 acode, struct vrequest *areq, int where) ENOSPC #endif ; + /* Some fileservers kill overly-idle calls with VNOSERVICE. */ + if (acode == VNOSERVICE) + return ETIMEDOUT; return acode;