OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_6-38-gac20b36

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


The following commit has been merged in the openafs-stable-1_6_x branch:
commit ac20b369188e259037b0d9dfaa4353e45e87e8f6
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Thu Oct 3 12:38:08 2013 -0500

    salvager: Ignore linktable-only RW volumes
    
    In general, the salvager will try to salvage any volume if we find an
    inode for that volume. However, for namei, we'll always have at least
    one inode for the RW volume, even if we only have e.g. an RO volume at
    a particular site, since the linktable special inode is always marked
    as for the RW volume id. So, if we salvage a volume group that only
    has an RO, normally we would also try to salvage the corresponding RW,
    even if it doesn't exist. We would then recreate the "missing"
    metadata files, so after salvaging, the RW appears to exist as a
    normal volume.
    
    The salvager currently tries to avoid this by skipping salvaging the
    RW if we find more than one volume in the volume group, and if the RW
    only has one special inode, and that one special inode is the
    linktable. This solves the problem most of the time, but misses a few
    corner cases:
    
     - If we found more than one linktable, we'll try to salvage the RW
       anyway. This shouldn't happen, but certain cases of corruption can
       cause incorrectly-named linktables, resulting in multiple
       linktables.
    
     - If we only find one volume (the RW), we'll still salvage the RW,
       even if the only inode for it is a single linktable. This can
       happen due to botched salvages in the past, or interrupted deletes
       and such. It's just cruft.
    
    In any situation like those, we cause an RW volume to be created where
    there previously was none. This can be a problem, since the RW volume
    is unknown to the administrator, and does not appear in the VLDB. Such
    "phantom" volumes can be very confusing and can cause problems in the
    future. For example, if that same RW volume is moved to the server
    with the "phantom" RW volume, we now have two of the same RW volume on
    the same server on different partitions, which is a big problem.
    
    So, to avoid these corner cases, check all of the special inodes to
    see if all of them are linktables. Also perform this check if we don't
    have any non-special inodes (even if we only see 1 volume), to catch
    the "cruft" case above.
    
    Reviewed-on: http://gerrit.openafs.org/10321
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
    (cherry picked from commit 600712877ca0883c6ec609d51909336964b06cba)
    
    Change-Id: Ia8fb952df3e7a2e85f47d9d9e903239e349791d9
    Reviewed-on: http://gerrit.openafs.org/10771
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: D Brashear <shadow@your-file-system.com>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

 src/vol/vol-salvage.c |   36 +++++++++++++++++++++++++++---------
 1 files changed, 27 insertions(+), 9 deletions(-)

-- 
OpenAFS Master Repository