]>
git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/mirror/snapshot/RemoveImageStateRequest.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef CEPH_LIBRBD_MIRROR_SNAPSHOT_REMOVE_IMAGE_STATE_REQUEST_H
5 #define CEPH_LIBRBD_MIRROR_SNAPSHOT_REMOVE_IMAGE_STATE_REQUEST_H
7 #include "include/buffer.h"
8 #include "include/types.h"
19 template <typename ImageCtxT
= librbd::ImageCtx
>
20 class RemoveImageStateRequest
{
22 static RemoveImageStateRequest
*create(ImageCtxT
*image_ctx
, uint64_t snap_id
,
24 return new RemoveImageStateRequest(image_ctx
, snap_id
, on_finish
);
27 RemoveImageStateRequest(ImageCtxT
*image_ctx
, uint64_t snap_id
,
29 : m_image_ctx(image_ctx
), m_snap_id(snap_id
), m_on_finish(on_finish
) {
44 * REMOVE_OBJECT (repeat for
52 ImageCtxT
*m_image_ctx
;
58 size_t m_object_count
= 0;
60 void get_object_count();
61 void handle_get_object_count(int r
);
64 void handle_remove_object(int r
);
69 } // namespace snapshot
73 extern template class librbd::mirror::snapshot::RemoveImageStateRequest
<librbd::ImageCtx
>;
75 #endif // CEPH_LIBRBD_MIRROR_SNAPSHOT_REMOVE_IMAGE_STATE_REQUEST_H