Skip to content
Snippets Groups Projects
Commit 862c76b2 authored by Johann Lombardi's avatar Johann Lombardi
Browse files

Branch b1_6

b=14909
i=tianzy

use cancel_lru_locks instead of "sync; sleep 1; sync" in sanity-quota.sh.
parent d59d00da
No related merge requests found
...@@ -185,7 +185,7 @@ test_1_sub() { ...@@ -185,7 +185,7 @@ test_1_sub() {
# this time maybe cache write, ignore it's failure # this time maybe cache write, ignore it's failure
$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(($LIMIT/2)) seek=$(($LIMIT/2)) || true $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(($LIMIT/2)) seek=$(($LIMIT/2)) || true
# flush cache, ensure noquota flag is setted on client # flush cache, ensure noquota flag is setted on client
sync; sleep 1; sync; cancel_lru_locks osc
$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$LIMIT && error "(usr) write success, but expect EDQUOT" $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$LIMIT && error "(usr) write success, but expect EDQUOT"
rm -f $TESTFILE rm -f $TESTFILE
...@@ -215,7 +215,7 @@ test_1_sub() { ...@@ -215,7 +215,7 @@ test_1_sub() {
log " Write out of block quota ..." log " Write out of block quota ..."
# this time maybe cache write, ignore it's failure # this time maybe cache write, ignore it's failure
$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(($LIMIT/2)) seek=$(($LIMIT/2)) || true $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(($LIMIT/2)) seek=$(($LIMIT/2)) || true
sync; sleep 1; sync; cancel_lru_locks osc
$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$LIMIT && error "(grp) write success, but expect EDQUOT" $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$LIMIT && error "(grp) write success, but expect EDQUOT"
# cleanup # cleanup
...@@ -343,7 +343,7 @@ test_block_soft() { ...@@ -343,7 +343,7 @@ test_block_soft() {
$RUNDD count=$((BUNIT_SZ+1)) || \ $RUNDD count=$((BUNIT_SZ+1)) || \
error "write failure, but expect success" error "write failure, but expect success"
OFFSET=$((OFFSET + BUNIT_SZ + 1)) OFFSET=$((OFFSET + BUNIT_SZ + 1))
sync; sleep 1; sync; cancel_lru_locks osc
$SHOW_QUOTA_USER $SHOW_QUOTA_USER
$SHOW_QUOTA_GROUP $SHOW_QUOTA_GROUP
...@@ -353,7 +353,7 @@ test_block_soft() { ...@@ -353,7 +353,7 @@ test_block_soft() {
$RUNDD count=$BUNIT_SZ seek=$OFFSET || \ $RUNDD count=$BUNIT_SZ seek=$OFFSET || \
error "write failure, but expect success" error "write failure, but expect success"
OFFSET=$((OFFSET + BUNIT_SZ)) OFFSET=$((OFFSET + BUNIT_SZ))
sync; sleep 1; sync; cancel_lru_locks osc
echo " Done" echo " Done"
echo " Sleep $TIMER seconds ..." echo " Sleep $TIMER seconds ..."
...@@ -365,10 +365,9 @@ test_block_soft() { ...@@ -365,10 +365,9 @@ test_block_soft() {
echo " Write after timer goes off" echo " Write after timer goes off"
# maybe cache write, ignore. # maybe cache write, ignore.
sync; sleep 1; sync;
$RUNDD count=$BUNIT_SZ seek=$OFFSET || true $RUNDD count=$BUNIT_SZ seek=$OFFSET || true
OFFSET=$((OFFSET + BUNIT_SZ)) OFFSET=$((OFFSET + BUNIT_SZ))
sync; sleep 1; sync; cancel_lru_locks osc
$RUNDD count=$BUNIT_SZ seek=$OFFSET && \ $RUNDD count=$BUNIT_SZ seek=$OFFSET && \
error "write success, but expect EDQUOT" error "write success, but expect EDQUOT"
...@@ -602,17 +601,17 @@ test_6() { ...@@ -602,17 +601,17 @@ test_6() {
$RUNDD count=$((LIMIT - BUNIT_SZ * OSTCOUNT)) || \ $RUNDD count=$((LIMIT - BUNIT_SZ * OSTCOUNT)) || \
error "write fileb failure, but expect success" error "write fileb failure, but expect success"
sync; sleep 1; sync; cancel_lru_locks osc
$SHOW_QUOTA_USER $SHOW_QUOTA_USER
$SHOW_QUOTA_GROUP $SHOW_QUOTA_GROUP
$RUNDD seek=$LIMIT count=$((BUNIT_SZ * OSTCOUNT)) && \ $RUNDD seek=$LIMIT count=$((BUNIT_SZ * OSTCOUNT)) && \
error "write fileb success, but expect EDQUOT" error "write fileb success, but expect EDQUOT"
sync; sleep 1; sync; cancel_lru_locks osc
echo " Write to OST0 return EDQUOT" echo " Write to OST0 return EDQUOT"
# this write maybe cache write, ignore it's failure # this write maybe cache write, ignore it's failure
RUNDD="$RUNAS dd if=/dev/zero of=$FILEA bs=$BLK_SZ" RUNDD="$RUNAS dd if=/dev/zero of=$FILEA bs=$BLK_SZ"
$RUNDD count=$(($BUNIT_SZ * 2)) || true $RUNDD count=$(($BUNIT_SZ * 2)) || true
sync; sleep 1; sync; cancel_lru_locks osc
$SHOW_QUOTA_USER $SHOW_QUOTA_USER
$SHOW_QUOTA_GROUP $SHOW_QUOTA_GROUP
$RUNDD count=$((BUNIT_SZ * 2)) seek=$((BUNIT_SZ *2)) && \ $RUNDD count=$((BUNIT_SZ * 2)) seek=$((BUNIT_SZ *2)) && \
...@@ -1218,7 +1217,7 @@ test_16_tub() { ...@@ -1218,7 +1217,7 @@ test_16_tub() {
# this time maybe cache write, ignore it's failure # this time maybe cache write, ignore it's failure
$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$((BUNIT_SZ * 4)) || true $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$((BUNIT_SZ * 4)) || true
# flush cache, ensure noquota flag is setted on client # flush cache, ensure noquota flag is setted on client
sync; sleep 1; sync; cancel_lru_locks osc
if [ $2 -eq 1 ]; then if [ $2 -eq 1 ]; then
$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$((BUNIT_SZ * 4)) || \ $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$((BUNIT_SZ * 4)) || \
error "(write failure, but expect success" error "(write failure, but expect success"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment