}
run_test 27R "test max_stripecount limitation when stripe count is set to -1"
-test_27S() {
- (( $MDS1_VERSION >= $(version_code 2.14.54) )) ||
- skip "Need MDS version at least 2.14.54"
- [[ "$(facet_host mds1)" != "$(facet_host ost1)" ]] ||
- skip "needs different host for mdt1 ost1"
-
- local count=$(precreated_ost_obj_count 0 0)
-
- echo "precreate count $count"
- mkdir_on_mdt0 $DIR/$tdir || error "mkdir $tdir failed"
- $LFS setstripe -i 0 -c 1 $DIR/$tdir || error "setstripe $tdir failed"
- #define OBD_FAIL_OSP_GET_LAST_FID 0x2109
- do_facet mds1 $LCTL set_param fail_loc=0x2109
- #define OBD_FAIL_OST_GET_LAST_FID 0x252
- do_facet ost1 $LCTL set_param fail_loc=0x252
- createmany -o $DIR/$tdir/f $count &
- pid=$!
- echo "precreate count $(precreated_ost_obj_count 0 0)"
- do_facet mds1 $LCTL set_param fail_loc=0
- do_facet ost1 $LCTL set_param fail_loc=0
- wait $pid || error "createmany failed"
- echo "precreate count $(precreated_ost_obj_count 0 0)"
-}
-run_test 27S "don't deactivate OSP on network issue"
-
test_27T() {
[ $(facet_host client) == $(facet_host ost1) ] &&
skip "need ost1 and client on different nodes"
free_min_max
local cache_size=$(do_facet ost$((MAXI+1)) \
"awk '/cache/ {sum+=\\\$4} END {print sum}' /proc/cpuinfo")
+
+ # LU-16042: can not get the cache size on Arm64 VM here, fallback to a
+ # pre-set value
+ if [ -z "$cache_size" ]; then
+ cache_size=256
+ fi
local large_file_size=$((cache_size * 2))
echo "OSS cache size: $cache_size KB"
test_230w() {
(( MDSCOUNT > 1 )) || skip "needs >= 2 MDTs"
- (( MDS1_VERSION >= $(version_code 2.14.53) )) ||
- skip "Need MDS version at least 2.14.53"
+ (( MDS1_VERSION >= $(version_code 2.15.0) )) ||
+ skip "Need MDS version at least 2.15.0"
- mkdir -p $DIR/$tdir/sub || error "mkdir failed"
+ mkdir -p $DIR/$tdir || error "mkdir $tdir failed"
+ createmany -o $DIR/$tdir/f 10 || error "create files failed"
+ createmany -d $DIR/$tdir/d 10 || error "create dirs failed"
$LFS migrate -m 1 -c $MDSCOUNT -d $DIR/$tdir ||
error "migrate failed"
(( $($LFS getdirstripe -c $DIR/$tdir) == MDSCOUNT )) ||
error "$tdir stripe count mismatch"
- (( $($LFS getdirstripe -c $DIR/$tdir/sub) == 0 )) ||
- error "$tdir/sub is striped"
+ for i in $(seq 0 9); do
+ (( $($LFS getdirstripe -c $DIR/$tdir/d$i) == 0 )) ||
+ error "d$i is striped"
+ done
}
run_test 230w "non-recursive mode dir migration"
}
run_test 820 "update max EA from open intent"
-test_822() {
- local p="$TMP/$TESTSUITE-$TESTNAME.parameters"
-
- save_lustre_params mds1 \
- "osp.$FSNAME-OST*-osc-MDT0000.max_create_count" > $p
- do_facet $SINGLEMDS "$LCTL set_param -n \
- osp.$FSNAME-OST*MDT0000.max_create_count=0"
- do_facet $SINGLEMDS "$LCTL set_param -n \
- osp.$FSNAME-OST0000*MDT0000.max_create_count=20000"
-
- # wait for statfs update to clear OS_STATFS_NOPRECREATE
- local maxage=$(do_facet mds1 $LCTL get_param -n \
- osp.$FSNAME-OST0000*MDT0000.maxage)
- sleep $((maxage + 1))
-
- #define OBD_FAIL_NET_ERROR_RPC 0x532
- do_facet mds1 "$LCTL set_param fail_loc=0x80000532 fail_val=5"
-
- stack_trap "restore_lustre_params < $p; rm $p"
-
- local count=$(do_facet $SINGLEMDS "lctl get_param -n \
- osp.$FSNAME-OST0000*MDT0000.create_count")
- for i in $(seq 1 $count); do
- touch $DIR/$tfile.${i} || error "touch failed"
- done
-}
-run_test 822 "test precreate failure"
-
test_823() {
local p="$TMP/$TESTSUITE-$TESTNAME.parameters"
local OST_MAX_PRECREATE=20000