OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_1pre2-149-g9a55866

Gerrit Code Review gerrit@openafs.org
Tue, 14 Aug 2012 13:26:57 -0700 (PDT)


The following commit has been merged in the openafs-stable-1_6_x branch:
commit bacb835a60ede55b0cc5598f60021487bd0caf0c
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.
    
    Reviewed-on: http://gerrit.openafs.org/6417
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Derrick Brashear <shadow@dementix.org>
    (cherry picked from commit 1a672914ab050811c99b6307c657630ab9b5c8ee)
    
    Change-Id: Ia30e7de919ccc14708112886e492e60f93fe6639
    Reviewed-on: http://gerrit.openafs.org/7940
    Reviewed-by: Derrick Brashear <shadow@dementix.org>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>

 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