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_OPERATION_SNAPSHOT_RENAME_REQUEST_H
5 #define CEPH_LIBRBD_OPERATION_SNAPSHOT_RENAME_REQUEST_H
7 #include "librbd/operation/Request.h"
18 template <typename ImageCtxT = ImageCtx>
19 class SnapshotRenameRequest : public Request<ImageCtxT> {
22 * Snap Rename goes through the following state machine:
41 SnapshotRenameRequest(ImageCtxT &image_ctx, Context *on_finish,
42 uint64_t snap_id, const std::string &snap_name);
44 journal::Event create_event(uint64_t op_tid) const override;
47 void send_op() override;
48 bool should_complete(int r) override;
52 std::string m_snap_name;
55 void send_rename_snap();
58 } // namespace operation
61 extern template class librbd::operation::SnapshotRenameRequest<librbd::ImageCtx>;
63 #endif // CEPH_LIBRBD_OPERATION_SNAPSHOT_RENAME_REQUEST_H