OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_2pre1-20-gaeb42c4

Gerrit Code Review gerrit@openafs.org
Sat, 22 Dec 2012 12:19:37 -0800 (PST)


The following commit has been merged in the openafs-stable-1_6_x branch:
commit aeb42c44bc005b8935650351470020f2e715bcb8
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Wed Dec 19 16:57:20 2012 -0600

    ihandle: Avoid FD cache in ih_sync_all
    
    If an ihandle is IH_REALLYCLOSE'd immediately before or during the
    IH_OPEN call in ih_sync_all, ih_sync_all can open a new file handle
    after the IH_REALLYCLOSE is complete. For a volume that has gone
    offline, this means that ih_sync_all can hold a file open for a volume
    that has gone offline, and is possibly being manipulated or deleted by
    an external program (e.g. the volserver for a clone operation).
    
    While the FdHandle_t is open, or after the handle has been closed and
    returned to the FD cache, another caller in the fileserver could try
    to open the same file and get back the cached FdHandle_t. If the file
    has been deleted by the volserver, this means the fileserver is
    writing to the 'wrong' file, as it has been deleted. This can result
    in a CopyOnWrite operation causing a file from the clients' point of
    view to suddenly become empty, or to revert to a previous version.
    
    To avoid this, prevent ih_sync_all from interacting with the FD cache
    entirely, and just open a file descriptor directly from the IHandle_t.
    This should prevent it from causing any problems with other users of
    the FD cache.
    
    This change is not intended for the master branch. The current
    intention for the master branch and future versions is to eliminate
    ih_sync_all entirely.
    
    FIXES 131530
    
    Change-Id: I809a0e3ebfe4692eab01671fdf83bf58676453f6
    Reviewed-on: http://gerrit.openafs.org/8796
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
    Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
    Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
    Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
    Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>

 src/vol/ihandle.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

-- 
OpenAFS Master Repository