]>
git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/mirror/snapshot/Utils.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_UTILS_H
5 #define CEPH_LIBRBD_MIRROR_SNAPSHOT_UTILS_H
7 #include "include/int_types.h"
8 #include "include/stringify.h"
19 std::string
get_image_meta_key(const std::string
& mirror_uuid
);
21 template <typename ImageCtxT
= librbd::ImageCtx
>
22 bool can_create_primary_snapshot(ImageCtxT
*image_ctx
, bool demoted
, bool force
,
23 bool* requires_orphan
,
24 uint64_t *rollback_snap_id
);
26 template <typename ImageCtxT
= librbd::ImageCtx
>
27 bool can_create_non_primary_snapshot(ImageCtxT
*image_ctx
);
29 template <typename ImageCtxT
= librbd::ImageCtx
>
30 std::string
image_state_object_name(ImageCtxT
*image_ctx
, uint64_t snap_id
,
34 } // namespace snapshot
38 #endif // CEPH_LIBRBD_MIRROR_SNAPSHOT_UTILS_H