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_OBJECT_MAP_INVALIDATE_REQUEST_H
5 #define CEPH_LIBRBD_OBJECT_MAP_INVALIDATE_REQUEST_H
7 #include "include/int_types.h"
8 #include "librbd/AsyncRequest.h"
16 namespace object_map {
18 template <typename ImageCtxT = ImageCtx>
19 class InvalidateRequest : public AsyncRequest<ImageCtxT> {
21 static InvalidateRequest* create(ImageCtxT &image_ctx, uint64_t snap_id,
22 bool force, Context *on_finish);
24 InvalidateRequest(ImageCtxT &image_ctx, uint64_t snap_id, bool force,
26 : AsyncRequest<ImageCtxT>(image_ctx, on_finish),
27 m_snap_id(snap_id), m_force(force) {
33 bool should_complete(int r) override;
34 int filter_return_code(int r) const override{
35 // never propagate an error back to the caller
44 } // namespace object_map
47 extern template class librbd::object_map::InvalidateRequest<librbd::ImageCtx>;
49 #endif // CEPH_LIBRBD_OBJECT_MAP_INVALIDATE_REQUEST_H