When changelog mask is changed from MINMASK to a particular
value then recalculation is missed, so effective mask could
stay unchanged against expectations.
Patch adds additional check that old mask is MINMASK or not
to decide if mask recalculation is needed.
Test 160o is extended for that issue.
Fixes:
ffe259f81cda ("LU-13055 changelog: use default mask if server has no mask")
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: Ia3c93e19daeb71ff1042ebdb555e918faf89f844
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48961
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
mdd->mdd_cl.mc_proc_mask = newmask;
- /* if mask keeps all bits from oldmask then just extend the current
- * mask, otherwise the current mask should be recalculated through
- * all user masks.
+ /* if oldmask is not MINMASK and newmask keeps all bits from oldmask
+ * then just extend the current mask, otherwise the current mask
+ * should be recalculated through all user masks.
*/
- if ((newmask & oldmask) == oldmask) {
+ if (oldmask != CHANGELOG_MINMASK && (newmask & oldmask) == oldmask) {
spin_lock(&mdd->mdd_cl.mc_user_lock);
mdd->mdd_cl.mc_current_mask |= newmask;
spin_unlock(&mdd->mdd_cl.mc_user_lock);
mdd.$mdt.changelog_current_mask -n)
[[ $mask == *"HLINK"* ]] || error "mask is not DEFMASK as expected"
+ if (( $MDS1_VERSION >= $(version_code 2.15.52) )) ; then
+ # set server mask back to some value
+ changelog_chmask "CLOSE,UNLNK"
+ # check effective mask again, should not remain as DEFMASK
+ mask=$(do_facet $SINGLEMDS $LCTL get_param \
+ mdd.$mdt.changelog_current_mask -n)
+ [[ $mask != *"HLINK"* ]] || error "mask is still DEFMASK"
+ fi
+
do_facet $SINGLEMDS $LCTL --device $mdt \
changelog_deregister -u test_160o ||
error "cannot deregister by name"