Skip to content

Commit

Permalink
os/bluestore: fix perfcounters for deferred io
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Mar 14, 2017
1 parent ee367d6 commit 593ea0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/os/bluestore/BlueStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7774,6 +7774,7 @@ void BlueStore::_deferred_try_submit(OpSequencer *osr)
txc->log_state_latency(logger, l_bluestore_state_deferred_queued_lat);
txc->state = TransContext::STATE_DEFERRED_AIO_WAIT;
for (auto opi = wt.ops.rbegin(); opi != wt.ops.rend(); ++opi) {
assert(opi->op == bluestore_deferred_op_t::OP_WRITE);
const auto& op = *opi;
uint64_t bl_offset = 0;
for (auto e : op.extents) {
Expand All @@ -7790,6 +7791,8 @@ void BlueStore::_deferred_try_submit(OpSequencer *osr)
bl.substr_of(op.data, bl_offset + j.get_start() - e.offset,
j.get_len());
if (!g_conf->bluestore_debug_omit_block_device_write) {
logger->inc(l_bluestore_deferred_write_ops);
logger->inc(l_bluestore_deferred_write_bytes, bl.length());
int r = bdev->aio_write(j.get_start(), bl, &last->ioc, false);
assert(r == 0);
}
Expand Down

0 comments on commit 593ea0f

Please sign in to comment.