OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-2031-g1a67291

Gerrit Code Review gerrit@openafs.org
Mon, 26 Dec 2011 20:32:19 -0800 (PST)


The following commit has been merged in the master branch:
commit 1a672914ab050811c99b6307c657630ab9b5c8ee
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Wed Dec 21 15:04:32 2011 -0500

    afs: Do not always ignore errors in afs_GetDSlot
    
    Currently afs_UFSGetDSlot will silently swallow any error in reading
    the specified dslot from disk, and will return a "blank" dcache to the
    caller. However, many callers of afs_GetDSlot will be asking for a
    dcache that we know exists, and more importantly, we know is on the
    global hash table. If a disk error is encountered and we're given a
    "blank" dcache, we will erroneously believe the dcache entry is not on
    the hash table, causing corruption of the hash table later on.
    
    So instead, modify all callers of afs_GetDSlot to use either
    afs_GetValidDSlot or afs_GetNewDSlot. Calling afs_GetValidDSlot
    indicates that the given dentry index is known to be valid, and any
    error encountered while reading the entry from disk should result in
    an error (for disk I/O errors we have no control over, this results in
    a NULL dentry returned; for internal consistency errors we panic).
    Calling afs_GetNewDSlot indicates that the specified index may not
    exist or may not be valid, and so returning a "blank" dentry in that
    case is fine.
    
    For memcache, the situation is the same, except any time we go to
    "disk" it is an (internal) error, since there is no disk.
    
    Change-Id: I53ea6e99649e4d6d5cbde58929dfcee1d45a3e7b
    Reviewed-on: http://gerrit.openafs.org/6417
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Derrick Brashear <shadow@dementix.org>

 src/afs/afs_chunkops.h     |    5 ++-
 src/afs/afs_dcache.c       |   72 +++++++++++++++++++++++++++++++------------
 src/afs/afs_disconnected.c |    4 +-
 src/afs/afs_pioctl.c       |    2 +-
 src/afs/afs_prototypes.h   |    4 +-
 src/afs/afs_segments.c     |   12 ++++----
 6 files changed, 66 insertions(+), 33 deletions(-)

-- 
OpenAFS Master Repository