Update pg stats on any op completion (read or write), not just writes. Do
the calls with log_op_stats() for consistency's sake. Skip if the request
was an error.
Fixes: #2209
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
// read or error?
if (ctx->op_t.empty() || result < 0) {
- log_op_stats(ctx);
+ if (result >= 0) {
+ log_op_stats(ctx);
+ update_stats();
+ }
MOSDOpReply *reply = ctx->reply;
reply->set_version(info.last_update);
dout(10) << "requeueing scrub for cleanup" << dendl;
osd->scrub_wq.queue(this);
}
- update_stats();
if (!repop->aborted)
eval_repop(repop);
if (repop->waitfor_disk.empty()) {
log_op_stats(repop->ctx);
+ update_stats();
if (m->wants_ondisk() && !repop->sent_disk) {
// send commit.