Set system with 2-component PFL layout (1 stripe each) to see if
only using a PFL layout is causing any test-script issues.
Allow compr_STRIPEPARAMS/fs_STRIPEPARAMS to change layout instead
of COMPR_EXTRA_LAYOUT for consistency with other test scripts.
Fix issue in setstripe_getstripe funtion to only print layout of given
dir/file
Test-Parameters: trivial testlist=sanity-compr
Test-Parameters: testlist=sanity-compr env=compr_STRIPEPARAMS="-E 64k -c 1 -E eof"
Test-Parameters: testlist=sanity-compr env=compr_STRIPEPARAMS="-E 64k -c 1 -E eof -c 2"
Test-Parameters: testlist=sanity-compr env=compr_STRIPEPARAMS="-E 64k -c 1 -E 1M -c 2 -E eof -c 4 -S 4M"
Signed-off-by: Wei Liu <sarah@whamcloud.com>
Change-Id: I8fa60c104bc69876be8805edbaab1574207d6cc2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53651
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
is_lustre $file || return 0
if [ -n "$params" ]; then
+ echo "setstripe option: $params"
$LFS setstripe $params $file ||
error "setstripe $params failed"
fi
- $LFS getstripe $file ||
+ $LFS getstripe -d $file ||
error "getstripe $file failed"
}
check_runas_id $RUNAS_ID $RUNAS_GID $RUNAS
save_layout_restore_at_exit $MOUNT
+# allow COMPR_EXTRA_LAYOUT for backward compatibility
+compr_STRIPEPARAMS=${compr_STRIPEPARAMS:-$COMPR_EXTRA_LAYOUT}
+compr_STRIPEPARAMS=${compr_STRIPEPARAMS:-${fs_STRIPEPARAMS:-"-E 1M -c1 -E eof"}}
# Set file system with different layout
-COMPR_EXTRA_LAYOUT=${COMPR_EXTRA_LAYOUT:-"-E EOF -c 1"}
-$LFS setstripe $COMPR_EXTRA_LAYOUT $MOUNT
+setstripe_getstripe $MOUNT $compr_STRIPEPARAMS
test_sanity()
{