We need to sync_and_flush *and* sync() again in order to retire any items
in the FileStore journal.
Signed-off-by: Sage Weil <sage@redhat.com>
dout(10) << "sync_and_flush done" << dendl;
}
+int FileStore::flush_journal()
+{
+ dout(10) << __func__ << dendl;
+ sync_and_flush();
+ sync();
+ return 0;
+}
+
int FileStore::snapshot(const string& name)
{
dout(10) << "snapshot " << name << dendl;
void flush();
void sync_and_flush();
+ int flush_journal();
int dump_journal(ostream& out);
void set_fsid(uuid_d u) {
virtual void sync(Context *onsync) {}
virtual void sync() {}
virtual void flush() {}
+
+ virtual int flush_journal() { return -EOPNOTSUPP; }
virtual void sync_and_flush() {}
virtual int dump_journal(ostream& out) { return -EOPNOTSUPP; }
}
f->close_section();
} else if (command == "flush_journal") {
- store->sync_and_flush();
+ store->flush_journal();
} else if (command == "dump_ops_in_flight" ||
command == "ops") {
if (!op_tracker.tracking_enabled) {