OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_1pre2-201-g7472866

Gerrit Code Review gerrit@openafs.org
Mon, 19 Nov 2012 18:43:49 -0800 (PST)


The following commit has been merged in the openafs-stable-1_6_x branch:
commit 7472866c71fddd7f7954b683b2b147bfd671cf7f
Author: Michael Meffie <mmeffie@sinenomine.net>
Date:   Tue Oct 30 10:22:40 2012 -0400

    vol: allow non-dafs volume utils to attach with V_READONLY again
    
    Allow non-fileserver, non-dafs, programs to attach volumes with the
    V_READONLY mode again. This was lost during the code changes for
    dafs.
    
    The caller sends a fssync request to the fileserver, which updates the
    on-disk contents of the volume headers, before the caller reads the
    volume headers, allowing the caller to have the most recent info about
    the volume. The fileserver still has the volume in use.
    
    Later in the attachment process, the inUse check is skipped for the case
    of a non-fileserver process which is attaching the volume using the
    V_READONLY mode, otherwise the attachment would incorrectly mark the
    volume as needing to be salvaged.
    
    Note: The mode checks in VMustCheckOutVolume() are correct. We must
    checkout the volume when attaching with the V_READONLY mode. This
    fix updates the VShouldCheckInUse(), in which an additional
    exception was added to cover the case for V_READONLY mode from a non-
    fileserver process.
    
    Note: A check is added in the dafs version of attach to avoid overwriting the
    inUse field when a volume utility is attaching a volume in V_READONLY mode.
    Currently, V_READONLY is not used by dafs, but this was done to avoid future
    errors.
    
    Reviewed-on: http://gerrit.openafs.org/8339
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    (cherry picked from commit 0eaa0d1baa8b8fe115301f188ce32176acc7b065)
    
    Change-Id: I584027e2104fd4928b16b591a2ab9e2613e49ec7
    Reviewed-on: http://gerrit.openafs.org/8458
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>

 src/vol/volume.c        |    2 +-
 src/vol/volume_inline.h |   25 ++++++++++++++++++++-----
 2 files changed, 21 insertions(+), 6 deletions(-)

-- 
OpenAFS Master Repository