bool get_journal_fsid = false;
bool get_osd_fsid = false;
bool get_cluster_fsid = false;
+ bool check_need_journal = false;
std::string dump_pg_log;
std::string val;
get_osd_fsid = true;
} else if (ceph_argparse_flag(args, i, "--get-journal-fsid", "--get-journal-uuid", (char*)NULL)) {
get_journal_fsid = true;
+ } else if (ceph_argparse_flag(args, i, "--check-needs-journal", (char*)NULL)) {
+ check_need_journal = true;
} else {
++i;
}
exit(r);
}
+ if (check_need_journal) {
+ if (store->check_need_journal())
+ cout << "yes" << std::endl;
+ else
+ cout << "no" << std::endl;
+ exit(0);
+ }
+
string magic;
uuid_d cluster_fsid, osd_fsid;
int w;
*/
virtual uint32_t get_target_version() = 0;
+ /**
+ * check whether need journal device
+ *
+ * It's not constant for backend store. FileStore could have journaless mode
+ * and KeyValueStore could have journal device for special backend.
+ */
+ virtual bool need_journal() = 0;
+
/**
* check the journal uuid/fsid, without opening
*/