From: anserper Date: Tue, 16 Jun 2009 19:56:50 +0000 (+0000) Subject: b=19867 X-Git-Tag: v1_9_220~137 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=985c291d4a94b8ecf57c6fe08703d934fe5d1090 b=19867 i=Yong Fan quota_save_version fixes --- diff --git a/lustre/tests/cfg/local.sh b/lustre/tests/cfg/local.sh index b454382..dceb554 100644 --- a/lustre/tests/cfg/local.sh +++ b/lustre/tests/cfg/local.sh @@ -45,7 +45,7 @@ DEBUG_SIZE=${DEBUG_SIZE:-10} SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff} ENABLE_QUOTA=${ENABLE_QUOTA:-""} -QUOTA_TYPE="ug" +QUOTA_TYPE="ug3" QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"} MKFSOPT="" diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index 007bc52..6d54952 100644 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -1804,7 +1804,7 @@ test_21() { run_test_with_stat 21 "run for fixing bug16053 ===========" test_22() { - quota_save_version "ug" + quota_save_version "ug3" stopall mount @@ -1812,8 +1812,8 @@ test_22() { 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" } diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index d17bf3c..606fe64 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -521,16 +521,21 @@ stop() { # 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 - [ -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 - do_facet mgs "lctl conf_param ${!varsvc}.ost.quota_type=$1" + do_facet mgs "lctl conf_param ${!varsvc}.ost.quota_type=$spec" done }