Signed-off-by: Sage Weil <sage@redhat.com>
Finisher io_work;
+ bool is_open;
+
public:
struct Op {
if (r < 0)
return r;
io_work.start();
+ is_open = true;
return 0;
}
if (r < 0)
return r;
io_work.start();
+ is_open = true;
return 0;
}
void close() {
// there should be no work queued!
io_work.stop();
+ is_open = false;
}
void compact() {
: db(0),
do_dump(false),
dump_fd(-1),
- io_work(g_ceph_context, "monstore") {
+ io_work(g_ceph_context, "monstore"),
+ is_open(false) {
string::const_reverse_iterator rit;
int pos = 0;
for (rit = path.rbegin(); rit != path.rend(); ++rit, ++pos) {
}
}
~MonitorDBStore() {
+ assert(!is_open);
if (do_dump)
::close(dump_fd);
}