OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-2390-gdf522b5

Gerrit Code Review gerrit@openafs.org
Wed, 11 Apr 2012 11:47:29 -0700 (PDT)


The following commit has been merged in the master branch:
commit df522b588396aaac3ec662b516ef7287f3b7c47b
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Thu Mar 22 17:54:12 2012 -0500

    salvager: Trust inode-based special data over OGM
    
    Currently the salvaging code looks for special inodes, and infers the
    volume id and inode type from the OGM data in each special inode file.
    However, we can already derive this information from the inode number
    itself for the special inode, so if they disagree, use the values
    based off of the inode number and correct the OGM data.
    
    The inode number should be more likely to be correct, since that is
    how we look up the special inode from the header when attaching the
    volume. It is also impossible to get special inode files with the same
    name, so this ensures we don't get duplicates. And for people that go
    snooping around /vicepX/AFSIDat even though we tell them not to, it
    seems more likely that they go around 'chmod'ing or 'chown'ing rather
    than 'mv'ing.
    
    This change avoids an abort in the salvaging code when the OGM data is
    wrong. If we trust the OGM data when it is incorrect, we assume the
    special inode file is for a different volume. So when we go to
    recreate one of the special files for the volume we're actually
    working with, the IH_CREATE fails (from EEXIST) and so we abort.
    
    Change-Id: Ibfaa1bfb27d190c5fec6fc673d88df366268e302
    Reviewed-on: http://gerrit.openafs.org/6946
    Tested-by: Derrick Brashear <shadow@dementix.org>
    Reviewed-by: Derrick Brashear <shadow@dementix.org>

 src/vol/namei_ops.c   |  103 +++++++++++++++++++++++++++++++++++++++++++------
 src/vol/namei_ops.h   |    1 +
 src/vol/vol-salvage.c |    8 ++++
 3 files changed, 100 insertions(+), 12 deletions(-)

-- 
OpenAFS Master Repository