X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2Fimage_sync%2FSyncPointPruneRequest.h;fp=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2Fimage_sync%2FSyncPointPruneRequest.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=65e13ef5d496210e96bbd5614bb13fc2adcebf54;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/tools/rbd_mirror/image_sync/SyncPointPruneRequest.h b/src/ceph/src/tools/rbd_mirror/image_sync/SyncPointPruneRequest.h deleted file mode 100644 index 65e13ef..0000000 --- a/src/ceph/src/tools/rbd_mirror/image_sync/SyncPointPruneRequest.h +++ /dev/null @@ -1,96 +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_SYNC_SYNC_POINT_PRUNE_REQUEST_H -#define RBD_MIRROR_IMAGE_SYNC_SYNC_POINT_PRUNE_REQUEST_H - -#include "librbd/journal/Types.h" -#include "librbd/journal/TypeTraits.h" -#include -#include - -class Context; -namespace journal { class Journaler; } -namespace librbd { class ImageCtx; } -namespace librbd { namespace journal { struct MirrorPeerClientMeta; } } - -namespace rbd { -namespace mirror { -namespace image_sync { - -template -class SyncPointPruneRequest { -public: - typedef librbd::journal::TypeTraits TypeTraits; - typedef typename TypeTraits::Journaler Journaler; - typedef librbd::journal::MirrorPeerClientMeta MirrorPeerClientMeta; - typedef librbd::journal::MirrorPeerSyncPoint MirrorPeerSyncPoint; - - static SyncPointPruneRequest* create(ImageCtxT *remote_image_ctx, - bool sync_complete, - Journaler *journaler, - MirrorPeerClientMeta *client_meta, - Context *on_finish) { - return new SyncPointPruneRequest(remote_image_ctx, sync_complete, journaler, - client_meta, on_finish); - } - - SyncPointPruneRequest(ImageCtxT *remote_image_ctx, bool sync_complete, - Journaler *journaler, MirrorPeerClientMeta *client_meta, - Context *on_finish); - - void send(); - -private: - /** - * @verbatim - * - * - * | - * | . . . . . - * | . . - * v v . (repeat if from snap - * REMOVE_SNAP . . . unused by other sync) - * | - * v - * REFRESH_IMAGE - * | - * v - * UPDATE_CLIENT - * | - * v - * - * - * @endverbatim - */ - - ImageCtxT *m_remote_image_ctx; - bool m_sync_complete; - Journaler *m_journaler; - MirrorPeerClientMeta *m_client_meta; - Context *m_on_finish; - - MirrorPeerClientMeta m_client_meta_copy; - std::list m_snap_names; - - bool m_invalid_master_sync_point = false; - - void send_remove_snap(); - void handle_remove_snap(int r); - - void send_refresh_image(); - void handle_refresh_image(int r); - - void send_update_client(); - void handle_update_client(int r); - - void finish(int r); -}; - -} // namespace image_sync -} // namespace mirror -} // namespace rbd - -extern template class rbd::mirror::image_sync::SyncPointPruneRequest; - -#endif // RBD_MIRROR_IMAGE_SYNC_SYNC_POINT_PRUNE_REQUEST_H