OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_7-143-g7ebe9b7

Gerrit Code Review gerrit@openafs.org
Thu, 3 Jun 2021 07:20:56 -0400


The following commit has been merged in the openafs-stable-1_8_x branch:
commit 7ebe9b70b994ba04d016a5bbf479f30934b7c632
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.
    
    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>
    (cherry picked from commit c72ec68bcea646aa3e0395ad103afb2ee9ba9cde)
    
    Change-Id: I7b40728bcb56c9bb0d86912f140fed315e93bf64
    Reviewed-on: https://gerrit.openafs.org/14610
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

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

-- 
OpenAFS Master Repository