+ sprintf(name, "%x", llog_test_rand+2);
+ CWARN("7: create a log with name: %s\n", name);
+ LASSERT(ctxt);
+
+ rc = llog_open_create(NULL, ctxt, &llh, NULL, name);
+ if (rc) {
+ CERROR("7: llog_create with name %s failed: %d\n", name, rc);
+ GOTO(ctxt_release, rc);
+ }
+ llog_init_handle(NULL, llh, LLOG_F_IS_PLAIN, &uuid);
+
+ lcr.lcr_hdr.lrh_len = lcr.lcr_tail.lrt_len = sizeof(lcr);
+ lcr.lcr_hdr.lrh_type = OST_SZ_REC;
+ rc = llog_write_rec(NULL, llh, &lcr.lcr_hdr, NULL, 0, NULL, -1);
+ if (rc) {
+ CERROR("7: write one log record failed: %d\n", rc);
+ GOTO(ctxt_release, rc);
+ }
+
+ rc = llog_destroy(NULL, llh);
+ if (rc)
+ CERROR("7: llog_destroy failed: %d\n", rc);
+ llog_close(NULL, llh);
+ctxt_release:
+ llog_ctxt_put(ctxt);