Fix crashes, print some stats

Notably:
- fix the `delete op` inside lambda callback crash (it frees the lambda itself
  which results in use-after-free with g++)
- fix stop_client() reenterability
- fix a bug in the blockstore layer which resulted in always returning version=0
  for zero-length reads
- change error codes for blockstore_stabilize
This commit is contained in:
Vitaliy Filippov
2020-03-31 17:55:31 +03:00
parent 92c800bb64
commit 0f43f6d3f6
14 changed files with 118 additions and 78 deletions
+2 -1
View File
@@ -247,6 +247,7 @@ void osd_t::handle_reply_hdr(osd_client_t *cl)
(tv_end.tv_sec - op->tv_begin.tv_sec)*1000000 +
(tv_end.tv_nsec - op->tv_begin.tv_nsec)/1000
);
op->callback(op);
// Copy lambda to be unaffected by `delete op`
std::function<void(osd_op_t*)>(op->callback)(op);
}
}