OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-13-gc72ec68

Gerrit Code Review gerrit@openafs.org
Thu, 6 May 2021 12:38:09 -0400


The following commit has been merged in the master branch:
commit c72ec68bcea646aa3e0395ad103afb2ee9ba9cde
Author: Mark Vitale <mvitale@sinenomine.net>
Date:   Thu Jan 28 10:01:13 2016 -0500

    afs: afsd -shutdown sets afs_cold_shutdown too soon
    
    'afsd -shutdown' always invokes syscall(AFSOP_SHUTDOWN)
    with parm2 set to 1 to indicate a "cold" shutdown.
    (There are no other callers to AFSOP_SHUTDOWN).
    
    AFSOP_SHUTDOWN sets global variable afs_cold_shutdown
    based on the value of parm2.  Then it checks to see if
    AFS is still mounted; if so, we return early with EACCES.
    However, global afs_cold_shutdown remains set.
    
    Therefore, the next successful 'umount' after a "failed"
    'afsd -shutdown' will always trigger a "cold" shutdown.
    This is contrary to the intent of the current implementation,
    which is to perform a "warm" shutdown upon 'umount' for
    most platforms.  (Exceptions:  AIX, OBSD, NBSD always
    specify a cold shutdown upon 'umount').
    
    This bug would never be noticed on the "cold" exception
    platforms, but on the "warm" platforms the inconsistency
    of seeing an unexpected "COLD" shutdown may be confusing
    and surprising.
    
    Make shutdown operation more self-consistent by modifying
    AFSOP_SHUTDOWN to defer setting of afs_cold_shutdown until
    after the mount test.
    
    Change-Id: If4ddb592d0b8fc8098f7ef96cec82f9f545b9099
    Reviewed-on: https://gerrit.openafs.org/12180
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

 src/afs/afs_call.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

-- 
OpenAFS Master Repository