X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Flibrbd%2Foperation%2FObjectMapIterate.h;fp=src%2Fceph%2Fsrc%2Flibrbd%2Foperation%2FObjectMapIterate.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=b46f87675236fcb73e126a2ec34b1c4b40eb4895;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/librbd/operation/ObjectMapIterate.h b/src/ceph/src/librbd/operation/ObjectMapIterate.h deleted file mode 100644 index b46f876..0000000 --- a/src/ceph/src/librbd/operation/ObjectMapIterate.h +++ /dev/null @@ -1,65 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab -#ifndef CEPH_LIBRBD_OPERATION_OBJECT_MAP_ITERATE_H -#define CEPH_LIBRBD_OPERATION_OBJECT_MAP_ITERATE_H - -#include -#include - -#include "include/int_types.h" -#include "include/rbd/object_map_types.h" -#include "librbd/AsyncRequest.h" - -namespace librbd { - -class ImageCtx; -class ProgressContext; - -namespace operation { - -template -using ObjectIterateWork = bool(*)(ImageCtxT &image_ctx, - uint64_t object_no, - uint8_t current_state, - uint8_t new_state); - -template -class ObjectMapIterateRequest : public AsyncRequest { -public: - ObjectMapIterateRequest(ImageCtxT &image_ctx, Context *on_finish, - ProgressContext &prog_ctx, - ObjectIterateWork handle_mismatch) - : AsyncRequest(image_ctx, on_finish), m_image_ctx(image_ctx), - m_prog_ctx(prog_ctx), m_handle_mismatch(handle_mismatch) - { - } - - void send() override; - -protected: - bool should_complete(int r) override; - -private: - enum State { - STATE_VERIFY_OBJECTS, - STATE_INVALIDATE_OBJECT_MAP - }; - - ImageCtxT &m_image_ctx; - ProgressContext &m_prog_ctx; - ObjectIterateWork m_handle_mismatch; - std::atomic_flag m_invalidate = ATOMIC_FLAG_INIT; - State m_state; - - void send_verify_objects(); - void send_invalidate_object_map(); - - uint64_t get_image_size() const; -}; - -} // namespace operation -} // namespace librbd - -extern template class librbd::operation::ObjectMapIterateRequest; - -#endif