X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2Fimage_replayer%2FIsPrimaryRequest.h;fp=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2Fimage_replayer%2FIsPrimaryRequest.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=ddb332cbfe69c1f98c760bea70aaa0819b1c5f17;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/tools/rbd_mirror/image_replayer/IsPrimaryRequest.h b/src/ceph/src/tools/rbd_mirror/image_replayer/IsPrimaryRequest.h deleted file mode 100644 index ddb332c..0000000 --- a/src/ceph/src/tools/rbd_mirror/image_replayer/IsPrimaryRequest.h +++ /dev/null @@ -1,67 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#ifndef RBD_MIRROR_IMAGE_REPLAYER_IS_PRIMARY_REQUEST_H -#define RBD_MIRROR_IMAGE_REPLAYER_IS_PRIMARY_REQUEST_H - -#include "include/buffer.h" - -class Context; -class ContextWQ; -namespace librbd { class ImageCtx; } - -namespace rbd { -namespace mirror { -namespace image_replayer { - -template -class IsPrimaryRequest { -public: - static IsPrimaryRequest* create(ImageCtxT *image_ctx, bool *primary, - Context *on_finish) { - return new IsPrimaryRequest(image_ctx, primary, on_finish); - } - - IsPrimaryRequest(ImageCtxT *image_ctx, bool *primary, Context *on_finish); - - void send(); - -private: - /** - * @verbatim - * - * - * | - * v - * GET_MIRROR_STATE * * * * * - * | * - * v * - * IS_TAG_OWNER * * * * * * * (error) - * | * - * v * - * < * * * * * * * * - * - * @endverbatim - */ - ImageCtxT *m_image_ctx; - bool *m_primary; - Context *m_on_finish; - - bufferlist m_out_bl; - - void send_get_mirror_state(); - void handle_get_mirror_state(int r); - - void send_is_tag_owner(); - void handle_is_tag_owner(int r); - - void finish(int r); -}; - -} // namespace image_replayer -} // namespace mirror -} // namespace rbd - -extern template class rbd::mirror::image_replayer::IsPrimaryRequest; - -#endif // RBD_MIRROR_IMAGE_REPLAYER_IS_PRIMARY_REQUEST_H