]>
git.proxmox.com Git - ceph.git/blob - ceph/src/common/ContextCompletion.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 #ifndef CEPH_ASYNC_COMPLETION_H
4 #define CEPH_ASYNC_COMPLETION_H
6 #include "include/Context.h"
10 class ContextCompletion
{
12 ContextCompletion(Context
*ctx
, bool ignore_enoent
);
14 void finish_adding_requests();
17 void finish_op(int r
);
25 uint64_t m_current_ops
;
28 class C_ContextCompletion
: public Context
{
30 C_ContextCompletion(ContextCompletion
&context_completion
)
31 : m_context_completion(context_completion
)
33 m_context_completion
.start_op();
36 void finish(int r
) override
{
37 m_context_completion
.finish_op(r
);
41 ContextCompletion
&m_context_completion
;
46 #endif // CEPH_ASYNC_COMPLETION_H