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)
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)
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"
[ $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 ] &&
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}')
test_10() {
local parent=$DIR/$tdir
+ local root_layout=$(get_layout_param $MOUNT)
rm -rf $parent
$LFS setstripe -d $MOUNT || error "clear root layout"
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"
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"
}
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