lderr(cct) << "failed to decode allocated tag" << dendl;
return r;
}
+
+ ldout(cct, 20) << "allocated journal tag: "
+ << "tid=" << tag.tid << ", "
+ << "data=" << *tag_data << dendl;
return 0;
}
lderr(cct) << "failed to decode journal tag" << dendl;
return r;
}
+
+ ldout(cct, 20) << "most recent journal tag: "
+ << "tid=" << *tag_tid << ", "
+ << "data=" << *tag_data << dendl;
return 0;
}
};
assert(m_state == STATE_INITIALIZING);
if (r < 0) {
- lderr(cct) << this << " " << __func__
+ lderr(cct) << this << " " << __func__ << ": "
<< "failed to initialize journal: " << cpp_strerror(r)
<< dendl;
destroy_journaler(r);
}
m_tag_class = image_client_meta->tag_class;
+ ldout(cct, 20) << "client: " << client << ", "
+ << "image meta: " << *image_client_meta << dendl;
+
C_DecodeTags *tags_ctx = new C_DecodeTags(
cct, &m_lock, &m_tag_tid, &m_tag_data, create_async_context_callback(
m_image_ctx, create_context_callback<
o.push_back(new TagData("mirror-uuid", "remote-mirror-uuid", true, 123, 234));
}
-} // namespace journal
-} // namespace librbd
-
-std::ostream &operator<<(std::ostream &out,
- const librbd::journal::EventType &type) {
+std::ostream &operator<<(std::ostream &out, const EventType &type) {
using namespace librbd::journal;
switch (type) {
return out;
}
-std::ostream &operator<<(std::ostream &out,
- const librbd::journal::ClientMetaType &type) {
+std::ostream &operator<<(std::ostream &out, const ClientMetaType &type) {
using namespace librbd::journal;
switch (type) {
break;
}
return out;
+}
+std::ostream &operator<<(std::ostream &out, const ImageClientMeta &meta) {
+ out << "[tag_class=" << meta.tag_class << "]";
+ return out;
}
+
+std::ostream &operator<<(std::ostream &out, const TagData &tag_data) {
+ out << "["
+ << "mirror_uuid=" << tag_data.mirror_uuid << ", "
+ << "predecessor_mirror_uuid=" << tag_data.predecessor_mirror_uuid;
+ if (tag_data.predecessor_commit_valid) {
+ out << ", "
+ << "predecessor_tag_tid=" << tag_data.predecessor_tag_tid << ", "
+ << "predecessor_entry_tid=" << tag_data.predecessor_entry_tid;
+ }
+ out << "]";
+ return out;
+}
+
+} // namespace journal
+} // namespace librbd
+
static void generate_test_instances(std::list<TagData *> &o);
};
+std::ostream &operator<<(std::ostream &out, const EventType &type);
+std::ostream &operator<<(std::ostream &out, const ClientMetaType &type);
+std::ostream &operator<<(std::ostream &out, const ImageClientMeta &meta);
+std::ostream &operator<<(std::ostream &out, const TagData &tag_data);
+
} // namespace journal
} // namespace librbd
-std::ostream &operator<<(std::ostream &out,
- const librbd::journal::EventType &type);
-std::ostream &operator<<(std::ostream &out,
- const librbd::journal::ClientMetaType &type);
-
WRITE_CLASS_ENCODER(librbd::journal::EventEntry);
WRITE_CLASS_ENCODER(librbd::journal::ClientData);
WRITE_CLASS_ENCODER(librbd::journal::TagData);