i=Yong Fan
quota_save_version fixes
SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff}
ENABLE_QUOTA=${ENABLE_QUOTA:-""}
SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff}
ENABLE_QUOTA=${ENABLE_QUOTA:-""}
QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"}
MKFSOPT=""
QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"}
MKFSOPT=""
run_test_with_stat 21 "run for fixing bug16053 ==========="
test_22() {
run_test_with_stat 21 "run for fixing bug16053 ==========="
test_22() {
- quota_save_version "ug"
+ quota_save_version "ug3"
echo "checking parameters"
echo "checking parameters"
- do_facet $SINGLEMDS "lctl get_param mdd.${FSNAME}-MDT*.quota_type" | grep "ug" || error "admin failure"
- do_facet ost1 "lctl get_param obdfilter.*.quota_type" | grep "ug" || error "op failure"
+ do_facet $SINGLEMDS "lctl get_param mdd.${FSNAME}-MDT*.quota_type" | grep "ug3" || error "admin failure"
+ do_facet ost1 "lctl get_param obdfilter.*.quota_type" | grep "ug3" || error "op failure"
run_test 0 "reboot lustre"
}
run_test 0 "reboot lustre"
}
# add an additional parameter if mountpoint is ever different from $MOUNT
quota_save_version() {
local fsname=${2:-$FSNAME}
# add an additional parameter if mountpoint is ever different from $MOUNT
quota_save_version() {
local fsname=${2:-$FSNAME}
+ local spec=$1
+ local ver=$(tr -c -d "123" <<< $spec)
+ local type=$(tr -c -d "ug" <<< $spec)
+
+ [ -n "$ver" -a "$ver" != "3" ] && error "wrong quota version specifier"
$LFS quotaoff -ug $MOUNT # just in case
$LFS quotaoff -ug $MOUNT # just in case
- [ -n "$1" ] && { $LFS quotacheck -$1 $MOUNT || error "quotacheck has failed"; }
+ [ -n "$type" ] && { $LFS quotacheck -$type $MOUNT || error "quotacheck has failed"; }
- do_facet mgs "lctl conf_param ${fsname}-MDT*.mdd.quota_type=$1"
+ do_facet mgs "lctl conf_param ${fsname}-MDT*.mdd.quota_type=$spec"
local varsvc
local osts=$(get_facets OST)
for ost in ${osts//,/ }; do
varsvc=${ost}_svc
local varsvc
local osts=$(get_facets OST)
for ost in ${osts//,/ }; do
varsvc=${ost}_svc
- do_facet mgs "lctl conf_param ${!varsvc}.ost.quota_type=$1"
+ do_facet mgs "lctl conf_param ${!varsvc}.ost.quota_type=$spec"