X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanity.sh;h=03c9cc99bec1dae3f407d0a94e8c36a21829678c;hp=79535c2d8a827d07d402fc575c0b4cea2e3c3c3b;hb=e709e661395af42471f5ecf3c87f2fa1d3031fbb;hpb=9d9db87afc80ed3e98e1fc05b3ad97a89ebf577a diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 79535c2d..03c9cc9 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -2037,6 +2037,35 @@ test_27D() { } run_test 27D "validate llapi_layout API" +# Verify that default_easize is increased from its initial value after +# accessing a widely striped file. +test_27E() { + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" && return + + # 72 bytes is the minimum space required to store striping + # information for a file striped across one OST: + # (sizeof(struct lov_user_md_v3) + + # sizeof(struct lov_user_ost_data_v1)) + local min_easize=72 + $LCTL set_param -n llite.*.default_easize $min_easize || + error "lctl set_param failed" + local easize=$($LCTL get_param -n llite.*.default_easize) + + [ $easize -eq $min_easize ] || + error "failed to set default_easize" + + $LFS setstripe -c $OSTCOUNT $DIR/$tfile || + error "setstripe failed" + cat $DIR/$tfile + rm $DIR/$tfile + + easize=$($LCTL get_param -n llite.*.default_easize) + + [ $easize -gt $min_easize ] || + error "default_easize not updated" +} +run_test 27E "check that default extended attribute size properly increases" + # createtest also checks that device nodes are created and # then visible correctly (#2091) test_28() { # bug 2091