OpenAFS Master Repository branch, master, updated. BP-openafs-stable-1_8_x-557-gf841c18

Gerrit Code Review gerrit@openafs.org
Fri, 3 Apr 2020 11:15:44 -0400


The following commit has been merged in the master branch:
commit f841c189a53f3a6bcf5c25336e4e0ad5362036e2
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Tue Mar 31 21:19:18 2020 -0500

    vos: Properly print volume transaction flags
    
    Currently, the code in 'vos status' treats the 'iflags' and 'vflags'
    of a transaction like an enumerated type; that is, we only check if
    'iflags' is equal to ITOffline or ITBusy, etc. But both of these flags
    fields are bitfields; any combination of the relevant flags could
    theoretically be set.
    
    Practically speaking, we only ever set at most one of the flags in
    'iflags', but if anything ever did set more than one flag, our output
    would look broken (we'd print "attachFlags:" without any flags).
    
    For 'vflags', multiple flags are often set at once: the most common
    combination is VTDeleteOnSalvage|VTOutOfService. So currently, we
    usually print "attachFlags:" without any actual flags, since the
    'vflags' field isn't exactly equal to VTDeleteOnSalvage (instead it's
    set to VTDeleteOnSalvage|VTOutOfService). And if we ever did see just
    VTDeleteOnSalvage set by itself, the way the switch() cases fall
    through to each other, we'd print out that _all_ flags are set.
    
    To fix all of this, just test for the individual flag bits instead.
    
    Change-Id: Ib4d207bc713f0ef8eb51b9dbeaf2af50395536ee
    Reviewed-on: https://gerrit.openafs.org/14126
    Tested-by: Andrew Deason <adeason@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

 src/volser/vos.c |   29 ++++++++++++++---------------
 1 files changed, 14 insertions(+), 15 deletions(-)

-- 
OpenAFS Master Repository