In some cases the MDS may not create all stripes on a file, if the
MDT-OST connection does not have precreated objects. This is OK,
so the tests should not fail the stripe-count check if trying to
create a fully-striped file and one of the stripes is missing.
parse_layout_param was modified to change the output value of
stripe count to be $OSTCOUNT if the stripe_count=$OSTCOUNT - 1.
Even if the stripe_count was meant to be $OSTCOUNT - 1 this
shouldn't fail any tests as both tested values will be modified.
Test-Parameters: trivial testlist=sanity env=ONLY=56xd-56xe,ONLY_REPEAT=100
Test-Parameters: trivial testlist=sanity env=ONLY=65n,ONLY_REPEAT=100
Test-Parameters: trivial testlist=sanity env=ONLY=184d,ONLY_REPEAT=100
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: Ie908a07d21b75e3ba60b7e6ca326675684ee2037
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55427
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
local param=""
if [[ ${invalues[0]} =~ "stripe_count:" ]]; then
- param="-c ${invalues[1]}"
+ (( ${invalues[1]} == $OSTCOUNT - 1 )) &&
+ param="-c $OSTCOUNT" || param="-c ${invalues[1]}"
fi
if [[ ${invalues[2]} =~ "stripe_size:" ]]; then
param="$param -S ${invalues[3]}"
local val=$(awk '{print $2}' <<< $line)
if [[ $line =~ ^"lmm_stripe_count:" ]]; then
+ (( $val == $OSTCOUNT - 1 )) &&
+ param="-c $OSTCOUNT" || param="-c $val"
echo "-c $val"
elif [[ $line =~ ^"lmm_stripe_size:" ]]; then
echo "-S $val"