]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
afs: Translate VNOSERVICE to ETIMEDOUT
authorAndrew Deason <adeason@sinenomine.net>
Tue, 28 Jan 2014 00:03:59 +0000 (18:03 -0600)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 27 Feb 2014 13:27:32 +0000 (05:27 -0800)
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 <shadow@your-file-system.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
(cherry picked from commit 335a70653adb59795f262663af3972de016c068d)

Change-Id: Ia0b4dbfb61353c08917898c3cb9128625023f311
Reviewed-on: http://gerrit.openafs.org/10814
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/afs_error.c

index a570f9c0d5ae85bc65ee886b1bf60ab106359d36..a2a42c04de969226851bc90e0040e5832fc853d1 100644 (file)
@@ -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;