X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2Fimage_replayer%2FOpenImageRequest.h;fp=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2Fimage_replayer%2FOpenImageRequest.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=01ab31171950bdfaacc28a3879949f9db505d952;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/tools/rbd_mirror/image_replayer/OpenImageRequest.h b/src/ceph/src/tools/rbd_mirror/image_replayer/OpenImageRequest.h deleted file mode 100644 index 01ab311..0000000 --- a/src/ceph/src/tools/rbd_mirror/image_replayer/OpenImageRequest.h +++ /dev/null @@ -1,71 +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_IMAGE_REQUEST_H -#define RBD_MIRROR_IMAGE_REPLAYER_OPEN_IMAGE_REQUEST_H - -#include "include/int_types.h" -#include "librbd/ImageCtx.h" -#include - -class Context; -namespace librbd { class ImageCtx; } - -namespace rbd { -namespace mirror { -namespace image_replayer { - -template -class OpenImageRequest { -public: - static OpenImageRequest* create(librados::IoCtx &io_ctx, - ImageCtxT **image_ctx, - const std::string &image_id, - bool read_only, Context *on_finish) { - return new OpenImageRequest(io_ctx, image_ctx, image_id, read_only, - on_finish); - } - - OpenImageRequest(librados::IoCtx &io_ctx, ImageCtxT **image_ctx, - const std::string &image_id, bool read_only, - Context *on_finish); - - void send(); - -private: - /** - * @verbatim - * - * - * | - * v - * OPEN_IMAGE - * | - * v - * - * - * @endverbatim - */ - librados::IoCtx &m_io_ctx; - ImageCtxT **m_image_ctx; - std::string m_image_id; - bool m_read_only; - Context *m_on_finish; - - void send_open_image(); - void handle_open_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::OpenImageRequest; - -#endif // RBD_MIRROR_IMAGE_REPLAYER_OPEN_IMAGE_REQUEST_H