Ensure all IO has been properly flushed and committed to the
journal before starting an op that could affect the IO path.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
}
on_safe = create_async_context_callback(m_image_ctx, on_safe);
+ on_safe = new FunctionContext([this, on_safe](int r) {
+ // ensure all committed IO before this op is committed
+ m_journaler->flush_commit_position(on_safe);
+ });
future.flush(on_safe);
CephContext *cct = m_image_ctx.cct;