Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / tools / rbd_ggate / Watcher.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #ifndef CEPH_RBD_GGATE_WATCHER_H
5 #define CEPH_RBD_GGATE_WATCHER_H
6
7 #include "include/rbd/librbd.hpp"
8
9 namespace rbd {
10 namespace ggate {
11
12 class Driver;
13
14 class Watcher : public librbd::UpdateWatchCtx
15 {
16 public:
17   Watcher(Driver *m_drv, librados::IoCtx &ioctx, librbd::Image &image,
18           size_t size);
19
20   void handle_notify() override;
21
22 private:
23   Driver *m_drv;
24   librados::IoCtx &m_ioctx;
25   librbd::Image &m_image;
26   size_t m_size;
27 };
28
29
30 } // namespace ggate
31 } // namespace rbd
32
33 #endif // CEPH_RBD_GGATE_WATCHER_H
34