The following commit has been merged in the master branch:
commit f841c189a53f3a6bcf5c25336e4e0ad5362036e2
Author: Andrew Deason <[email protected]>
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 <[email protected]>
    Tested-by: BuildBot <[email protected]>
    Reviewed-by: Cheyenne Wills <[email protected]>
    Reviewed-by: Benjamin Kaduk <[email protected]>

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

-- 
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs

Reply via email to