X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fsanity-hsm.sh;h=8949a08c2a53c1eda67b7cd3c575c64fe82fecae;hp=25c9cf8a14f21bf93c2119b77382a4a5b690eda9;hb=37a5157b84bce367e31743cb8648a15618492531;hpb=7af6307ba4e67673bc52aaaeb54f2cb4b632a3b7 diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index 25c9cf8..8949a08 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -5264,6 +5264,45 @@ test_406() { } run_test 406 "attempting to migrate HSM archived files is safe" +test_407() { + needclients 2 || return 0 + # test needs a running copytool + copytool_setup + + mkdir -p $DIR/$tdir + + local f=$DIR/$tdir/$tfile + local f2=$DIR2/$tdir/$tfile + local fid + fid=$(make_custom_file_for_progress $f 39 1000000) + [ $? != 0 ] && skip "not enough free space" && return + + $LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $f + wait_request_state $fid ARCHIVE SUCCEED + $LFS hsm_release $f + +#define OBD_FAIL_MDS_HSM_CDT_DELAY 0x164 + do_facet $SINGLEMDS $LCTL set_param fail_val=5 fail_loc=0x164 + + md5sum $f & + # 1st request holds layout lock while appropriate + # RESTORE record is still not added to llog + md5sum $f2 & + sleep 2 + + # after umount hsm_actions->O/x/x log shouldn't have + # double RESTORE records like below + #[0x200000401:0x1:0x0]...0x58d03a0d/0x58d03a0c action=RESTORE...WAITING + #[0x200000401:0x1:0x0]...0x58d03a0c/0x58d03a0d action=RESTORE...WAITING + sleep 30 && + do_facet $SINGLEMDS "$LCTL get_param $HSM_PARAM.actions"& + fail $SINGLEMDS + + wait_request_state $fid RESTORE SUCCEED + copytool_cleanup +} +run_test 407 "Check for double RESTORE records in llog" + test_500() { [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.6.92) ] &&