if (lod_comp->llc_stripe_size <= 0)
lod_comp->llc_stripe_size =
def_comp->llc_stripe_size;
- if (lod_comp->llc_stripe_offset == LOV_OFFSET_DEFAULT)
+ if (lod_comp->llc_stripe_offset == LOV_OFFSET_DEFAULT &&
+ (!lod_comp->llc_pool || !lod_comp->llc_pool[0]))
lod_comp->llc_stripe_offset =
def_comp->llc_stripe_offset;
if (lod_comp->llc_pool == NULL)
}
run_test 27H "Set specific OSTs stripe"
+test_27I() {
+ [ $PARALLEL == "yes" ] && skip "skip parallel run"
+ [[ $OSTCOUNT -lt 2 ]] && skip_env "needs >= 2 OSTs"
+ local pool=$TESTNAME
+ local ostrange="1 1 1"
+
+ save_layout_restore_at_exit $MOUNT
+ $LFS setstripe -c 2 -i 0 $MOUNT
+ pool_add $pool || error "pool_add failed"
+ pool_add_targets $pool $ostrange || "pool_add_targets failed"
+ test_mkdir $DIR/$tdir
+ $LFS setstripe -p $pool $DIR/$tdir
+ $MULTIOP $DIR/$tdir/$tfile Oc || error "multiop failed"
+ $LFS getstripe $DIR/$tdir/$tfile
+}
+run_test 27I "check that root dir striping does not break parent dir one"
+
# createtest also checks that device nodes are created and
# then visible correctly (#2091)
test_28() { # bug 2091
local rc
test_mkdir -p $DIR/$tdir
- $LFS setstripe -i 0 $DIR/$tdir
+ $LFS setstripe -i 0 -c 1 $DIR/$tdir
#test 10 returns only success/failure
i=10