X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsanity-pfl.sh;h=a846956f623e25de8ea9fbdf48359a65b40c8f17;hb=aa096c486589129a7bc20f9b8c31803e56c4b82f;hp=d8f56be73066bd3827070f05928fb5db07d1d5ef;hpb=7da1d93e2320bd7e6db8062350a90a651a00f84b;p=fs%2Flustre-release.git diff --git a/lustre/tests/sanity-pfl.sh b/lustre/tests/sanity-pfl.sh index d8f56be..a846956 100644 --- a/lustre/tests/sanity-pfl.sh +++ b/lustre/tests/sanity-pfl.sh @@ -48,7 +48,7 @@ test_0() { error "Create $comp_file failed" #instantiate all components, so that objs are allocted - dd if=/dev/zero of=$comp_file bs=1k count=1 seek=1k + dd if=/dev/zero of=$comp_file bs=1k count=1 seek=2k local ost_idx1=$($LFS getstripe -I 1 -i $comp_file) local ost_idx2=$($LFS getstripe -I 2 -i $comp_file) @@ -71,7 +71,7 @@ test_1() { error "Create $comp_file failed" #instantiate all components, so that objs are allocted - dd if=/dev/zero of=$comp_file bs=1k count=1 seek=1k + dd if=/dev/zero of=$comp_file bs=1k count=1 seek=2k local ost_idx1=$($LFS getstripe -I 1 -i $comp_file) local ost_idx2=$($LFS getstripe -I 2 -i $comp_file) @@ -173,7 +173,7 @@ test_3() { error "Create second $comp_file failed" #instantiate all components, so that objs are allocted - dd if=/dev/zero of=$comp_file bs=1k count=1 seek=16k + dd if=/dev/zero of=$comp_file bs=1k count=1 seek=17k del_comp_and_verify $comp_file "init" 0 0 rm -f $comp_file || error "Delete second $comp_file failed" @@ -205,7 +205,7 @@ test_5() { [ $comp_cnt -ne 2 ] && error "file $comp_cnt != 2" #instantiate all components, so that objs are allocted - dd if=/dev/zero of=$comp_file bs=1k count=1 seek=64k + dd if=/dev/zero of=$comp_file bs=1k count=1 seek=65k local ost_idx=$($LFS getstripe -I 1 -i $comp_file) [ $ost_idx -ne 0 ] && @@ -346,7 +346,7 @@ test_9() { replay_barrier $SINGLEMDS # instantiate the 2nd component - dd if=/dev/zero of=$comp_file bs=1k count=1 seek=1k + dd if=/dev/zero of=$comp_file bs=1k count=1 seek=2k local f1=$($LFS getstripe -I 2 $comp_file | awk '/l_fid:/ {print $7}') @@ -369,6 +369,7 @@ component_dump() { test_10() { local parent=$DIR/$tdir + local root_layout=$(get_layout_param $MOUNT) rm -rf $parent $LFS setstripe -d $MOUNT || error "clear root layout" @@ -406,6 +407,8 @@ test_10() { error "$parent/file1 does not inherite parent layout" [ x$f2_expect != x$f2_entry ] && error "$parent/file2 does not inherite root layout" + + $LFS setstripe $root_layout $MOUNT return 0 } run_test 10 "Inherit composite template from root" @@ -448,8 +451,11 @@ test_11() { f4=$($LFS getstripe -I 4 $comp_file | grep "l_fid") [[ -n $f4 ]] && error "3: 4th component instantiated" - # all 4 components instantiated - dd if=/dev/zero of=$comp_file bs=1k count=1 seek=3k + # all 4 components instantiated, using append write + dd if=/dev/zero of=$comp_file bs=1k count=1 seek=2k + ls -l $comp_file + rwv -f $comp_file -w -a -n 2 $((1024*1023)) 1 + ls -l $comp_file f4=$($LFS getstripe -I 4 $comp_file | grep "l_fid") [[ -z $f4 ]] && error "4: 4th component uninstantiated" @@ -492,6 +498,26 @@ test_12() { } run_test 12 "Verify ost list specification" +test_13() { # LU-9311 + [ $OSTCOUNT -lt 8 ] && skip "needs >= 8 OSTs" && return + + local file=$DIR/$tfile + local dd_count=4 + local dd_size=$(($dd_count * 1024 * 1024)) + local real_size + + rm -f $file + $LFS setstripe -E 1M -c 1 -E 2M -c 2 -E -1 -c -1 -i 1 $file || + error "Create $file failed" + dd if=/dev/zero of=$file bs=1M count=$dd_count + real_size=$(stat -c %s $file) + [ $real_size -eq $dd_size ] || + error "dd actually wrote $real_size != $dd_size bytes" + + rm -f $file +} +run_test 13 "shouldn't reprocess granted resent request" + complete $SECONDS check_and_cleanup_lustre exit_status