X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2Fimage_replayer%2FOpenLocalImageRequest.h;fp=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2Fimage_replayer%2FOpenLocalImageRequest.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=58de545fb3a20724920b9e84575fad9bbf4e3633;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.h b/src/ceph/src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.h deleted file mode 100644 index 58de545..0000000 --- a/src/ceph/src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.h +++ /dev/null @@ -1,90 +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_OPEN_LOCAL_IMAGE_REQUEST_H -#define RBD_MIRROR_IMAGE_REPLAYER_OPEN_LOCAL_IMAGE_REQUEST_H - -#include "include/int_types.h" -#include "librbd/ImageCtx.h" -#include - -class Context; -class ContextWQ; -namespace librbd { class ImageCtx; } - -namespace rbd { -namespace mirror { -namespace image_replayer { - -template -class OpenLocalImageRequest { -public: - static OpenLocalImageRequest* create(librados::IoCtx &local_io_ctx, - ImageCtxT **local_image_ctx, - const std::string &local_image_id, - ContextWQ *work_queue, - Context *on_finish) { - return new OpenLocalImageRequest(local_io_ctx, local_image_ctx, - local_image_id, work_queue, on_finish); - } - - OpenLocalImageRequest(librados::IoCtx &local_io_ctx, - ImageCtxT **local_image_ctx, - const std::string &local_image_id, - ContextWQ *m_work_queue, - Context *on_finish); - - void send(); - -private: - /** - * @verbatim - * - * - * | - * v - * OPEN_IMAGE * * * * * * * * - * | * - * v * - * IS_PRIMARY * * * * * * * * - * | * - * v (skip if primary) v - * LOCK_IMAGE * * * > CLOSE_IMAGE - * | | - * v | - * <---------------/ - * - * @endverbatim - */ - librados::IoCtx &m_local_io_ctx; - ImageCtxT **m_local_image_ctx; - std::string m_local_image_id; - ContextWQ *m_work_queue; - Context *m_on_finish; - - bool m_primary = false; - int m_ret_val = 0; - - void send_open_image(); - void handle_open_image(int r); - - void send_is_primary(); - void handle_is_primary(int r); - - void send_lock_image(); - void handle_lock_image(int r); - - void send_close_image(int r); - void handle_close_image(int r); - - void finish(int r); - -}; - -} // namespace image_replayer -} // namespace mirror -} // namespace rbd - -extern template class rbd::mirror::image_replayer::OpenLocalImageRequest; - -#endif // RBD_MIRROR_IMAGE_REPLAYER_OPEN_LOCAL_IMAGE_REQUEST_H