librbd/DiffIterate.cc
librbd/ExclusiveLock.cc
librbd/ImageCtx.cc
- librbd/ImageRefresh.cc
+ librbd/ImageState.cc
librbd/ImageWatcher.cc
librbd/internal.cc
librbd/Journal.cc
+++ /dev/null
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
-#include "librbd/ImageRefresh.h"
-#include "common/dout.h"
-#include "common/errno.h"
-#include "librbd/image/RefreshRequest.h"
-
-#define dout_subsys ceph_subsys_rbd
-#undef dout_prefix
-#define dout_prefix *_dout << "librbd::ImageRefresh: "
-
-namespace librbd {
-
-template <typename I>
-ImageRefresh<I>::ImageRefresh(I &image_ctx) : m_image_ctx(image_ctx) {
-}
-
-template <typename I>
-bool ImageRefresh<I>::is_refresh_required() const {
- // TODO future entry point for AIO ops -- to replace ictx_check call
- return false;
-}
-
-template <typename I>
-void ImageRefresh<I>::refresh(Context *on_finish) {
- // TODO simple state machine to restrict to a single in-progress refresh / snap set
- image::RefreshRequest<I> *req = image::RefreshRequest<I>::create(
- m_image_ctx, on_finish);
- req->send();
-}
-
-} // namespace librbd
-
-template class librbd::ImageRefresh<librbd::ImageCtx>;
+++ /dev/null
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
-#ifndef CEPH_LIBRBD_IMAGE_REFRESH_H
-#define CEPH_LIBRBD_IMAGE_REFRESH_H
-
-#include "include/int_types.h"
-
-class Context;
-
-namespace librbd {
-
-class ImageCtx;
-
-template <typename ImageCtxT = ImageCtx>
-class ImageRefresh {
-public:
- ImageRefresh(ImageCtxT &image_ctx);
-
- bool is_refresh_required() const;
-
- void refresh(Context *on_finish);
-
-private:
- ImageCtxT &m_image_ctx;
-
-};
-
-} // namespace librbd
-
-extern template class librbd::ImageRefresh<librbd::ImageCtx>;
-
-#endif // CEPH_LIBRBD_IMAGE_REFRESH_H
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#include "librbd/ImageState.h"
+#include "common/dout.h"
+#include "common/errno.h"
+#include "librbd/image/StateRequest.h"
+
+#define dout_subsys ceph_subsys_rbd
+#undef dout_prefix
+#define dout_prefix *_dout << "librbd::ImageState: "
+
+namespace librbd {
+
+template <typename I>
+ImageState<I>::ImageState(I &image_ctx) : m_image_ctx(image_ctx) {
+}
+
+template <typename I>
+bool ImageState<I>::is_refresh_required() const {
+ // TODO future entry point for AIO ops -- to replace ictx_check call
+ return false;
+}
+
+template <typename I>
+void ImageState<I>::refresh(Context *on_finish) {
+ // TODO simple state machine to restrict to a single in-progress refresh / snap set
+ image::StateRequest<I> *req = image::StateRequest<I>::create(
+ m_image_ctx, on_finish);
+ req->send();
+}
+
+} // namespace librbd
+
+template class librbd::ImageState<librbd::ImageCtx>;
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#ifndef CEPH_LIBRBD_IMAGE_STATE_H
+#define CEPH_LIBRBD_IMAGE_STATE_H
+
+#include "include/int_types.h"
+
+class Context;
+
+namespace librbd {
+
+class ImageCtx;
+
+template <typename ImageCtxT = ImageCtx>
+class ImageState {
+public:
+ ImageState(ImageCtxT &image_ctx);
+
+ bool is_refresh_required() const;
+
+ void refresh(Context *on_finish);
+
+private:
+ ImageCtxT &m_image_ctx;
+
+};
+
+} // namespace librbd
+
+extern template class librbd::ImageState<librbd::ImageCtx>;
+
+#endif // CEPH_LIBRBD_IMAGE_STATE_H
librbd/DiffIterate.cc \
librbd/ExclusiveLock.cc \
librbd/ImageCtx.cc \
- librbd/ImageRefresh.cc \
+ librbd/ImageState.cc \
librbd/ImageWatcher.cc \
librbd/internal.cc \
librbd/Journal.cc \
librbd/DiffIterate.h \
librbd/ExclusiveLock.h \
librbd/ImageCtx.h \
- librbd/ImageRefresh.h \
+ librbd/ImageState.h \
librbd/ImageWatcher.h \
librbd/internal.h \
librbd/Journal.h \