X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Flibrbd%2Fwatcher%2FNotifier.h;fp=src%2Fceph%2Fsrc%2Flibrbd%2Fwatcher%2FNotifier.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=8b0ad37b4d3d08c4bfd4c3fe23322affd487f803;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/librbd/watcher/Notifier.h b/src/ceph/src/librbd/watcher/Notifier.h deleted file mode 100644 index 8b0ad37..0000000 --- a/src/ceph/src/librbd/watcher/Notifier.h +++ /dev/null @@ -1,63 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#ifndef CEPH_LIBRBD_WATCHER_NOTIFIER_H -#define CEPH_LIBRBD_WATCHER_NOTIFIER_H - -#include "include/int_types.h" -#include "include/buffer_fwd.h" -#include "include/Context.h" -#include "include/rados/librados.hpp" -#include "common/Mutex.h" -#include "common/WorkQueue.h" -#include - -namespace librbd { - -namespace watcher { - -struct NotifyResponse; - -class Notifier { -public: - static const uint64_t NOTIFY_TIMEOUT; - - Notifier(ContextWQ *work_queue, librados::IoCtx &ioctx, - const std::string &oid); - ~Notifier(); - - void flush(Context *on_finish); - void notify(bufferlist &bl, NotifyResponse *response, Context *on_finish); - -private: - typedef std::list Contexts; - - struct C_AioNotify : public Context { - Notifier *notifier; - NotifyResponse *response; - Context *on_finish; - bufferlist out_bl; - - C_AioNotify(Notifier *notifier, NotifyResponse *response, - Context *on_finish); - - void finish(int r) override; - }; - - ContextWQ *m_work_queue; - librados::IoCtx &m_ioctx; - CephContext *m_cct; - std::string m_oid; - - Mutex m_aio_notify_lock; - size_t m_pending_aio_notifies = 0; - Contexts m_aio_notify_flush_ctxs; - - void handle_notify(int r, Context *on_finish); - -}; - -} // namespace watcher -} // namespace librbd - -#endif // CEPH_LIBRBD_WATCHER_NOTIFIER_H