OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_6-32-g1dd3a38

Gerrit Code Review gerrit@openafs.org
Thu, 27 Feb 2014 05:27:02 -0800 (PST)


The following commit has been merged in the openafs-stable-1_6_x branch:
commit 1dd3a383cb1e192b042bbbe7b62d25915bb88e5f
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Fri Dec 20 12:16:37 2013 -0600

    afs: Return raw code from background daemons
    
    Currently, a background daemon processing a 'store' request will
    return any error code in the 'code' field in the brequest structure,
    for processing by anyone that's waiting for the response. Since any
    waiter will not have access to the treq for the request, they won't be
    able to call afs_CheckCode on that return code, so the background
    daemon calls afs_CheckCode before returning its error code.
    
    Currently, afs_close uses the 'code' value from the background daemon
    as if it were not passed through afs_CheckCode. That is, if all
    background daemons are busy, we get our 'code' directly from
    afs_StoreOnLastReference, and if we use a background daemon, our
    'code' is tb->code. But these values are two different things: the
    return value from afs_StoreOnLastReference is a raw error code, and
    the code from the background daemon (tb->code) has been translated
    through afs_CheckCode.
    
    This can be confusing, in particular for the scenario where a
    StoreData fails because of network errors or because of a VBUSY error.
    If we get a network error when the request went through a background
    daemon, afs_CheckCode will translate this to ETIMEDOUT, which is
    commonly value 110, the same as VBUSY. So, an ETIMEDOUT error from the
    background daemon is difficult to distinguish from a VBUSY error from
    a direct afs_StoreOnLastReference call. Either case can result in a
    message to the kernel like the following:
    
      afs: failed to store file (110)
    
    To resolve this, have the background daemon store both the 'raw' error
    code, and the error code that has been translated through
    afs_CheckCode. afs_close can then use the raw error code when
    reporting messages like normal, but can still use the translated error
    code to return to the caller, if it has a translated error. With this
    change, now afs_close will always log "network problems" for a network
    error, regardless of if the error came in via a background daemon or a
    direct afs_StoreOnLastReference call.
    
    In Irix's afs_delmap, we just remove the old usage of tb->code, since
    the result was not used for anything.
    
    Reviewed-on: http://gerrit.openafs.org/10633
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    (cherry picked from commit 7f58e4ac454f9c06fb2d51ff0a17b8656c454efe)
    
    Change-Id: Id5935d41b0d20000f06b39c48649cd7d0dd2fd81
    Reviewed-on: http://gerrit.openafs.org/10812
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
    Reviewed-by: D Brashear <shadow@your-file-system.com>
    Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

 src/afs/IRIX/osi_vnodeops.c    |    1 -
 src/afs/VNOPS/afs_vnop_write.c |   12 ++++++++++--
 src/afs/afs.h                  |    3 ++-
 src/afs/afs_daemons.c          |   14 ++++++++++++--
 src/afs/afs_dcache.c           |    2 +-
 5 files changed, 25 insertions(+), 7 deletions(-)

-- 
OpenAFS Master Repository