X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fqa%2Fworkunits%2Fsuites%2Fcephfs_journal_tool_smoke.sh;h=60e91496511f9cbb446e73184f36e9d2cc7f92a9;hb=224ce89bce8186937e77bdbda572a650953f8c23;hp=fe9b60ab57e4b914c536c1330554140aa32ad94b;hpb=7c673caec407dd16107e56e4b51a6d00f021315c;p=ceph.git diff --git a/ceph/qa/workunits/suites/cephfs_journal_tool_smoke.sh b/ceph/qa/workunits/suites/cephfs_journal_tool_smoke.sh index fe9b60ab5..60e914965 100755 --- a/ceph/qa/workunits/suites/cephfs_journal_tool_smoke.sh +++ b/ceph/qa/workunits/suites/cephfs_journal_tool_smoke.sh @@ -55,7 +55,16 @@ $BIN journal reset $BIN journal inspect $BIN header get -# Can we import what we exported? +echo "Rolling back journal to original state..." +$BIN journal import $JOURNAL_FILE + +echo "Testing 'header' commands..." +$BIN header get +$BIN header set write_pos 123 +$BIN header set expire_pos 123 +$BIN header set trimmed_pos 123 + +echo "Rolling back journal to original state..." $BIN journal import $JOURNAL_FILE echo "Testing 'event' commands..." @@ -71,19 +80,13 @@ if [ ! -s $BINARY_OUTPUT ] ; then echo "Export to $BINARY_OUTPUT failed" exit -1 fi -$BIN event apply summary +$BIN event recover_dentries summary $BIN event splice summary -echo "Rolling back journal to original state..." -$BIN journal import $JOURNAL_FILE - -echo "Testing 'header' commands..." - -$BIN header get -$BIN header set write_pos 123 -$BIN header set expire_pos 123 -$BIN header set trimmed_pos 123 - -echo "Rolling back journal to original state..." -$BIN journal import $JOURNAL_FILE +# Tests finish. +# Metadata objects have been modified by the 'event recover_dentries' command. +# Journal is no long consistent with respect to metadata objects (especially inotable). +# To ensure mds successfully replays its journal, we need to do journal reset. +$BIN journal reset +cephfs-table-tool all reset session