mirror of
https://github.com/ceph/ceph
synced 2025-01-19 09:32:00 +00:00
cls_rbd_client: use snapid_t type
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
c70c09f63a
commit
c7f91e6c3d
@ -95,7 +95,7 @@ namespace librbd {
|
||||
}
|
||||
|
||||
int get_features(librados::IoCtx *ioctx, const std::string &oid,
|
||||
uint64_t snap_id, uint64_t *features)
|
||||
snapid_t snap_id, uint64_t *features)
|
||||
{
|
||||
bufferlist inbl, outbl;
|
||||
::encode(snap_id, inbl);
|
||||
@ -133,7 +133,7 @@ namespace librbd {
|
||||
}
|
||||
|
||||
int get_size(librados::IoCtx *ioctx, const std::string &oid,
|
||||
uint64_t snap_id, uint64_t *size, uint8_t *order)
|
||||
snapid_t snap_id, uint64_t *size, uint8_t *order)
|
||||
{
|
||||
bufferlist inbl, outbl;
|
||||
::encode(snap_id, inbl);
|
||||
@ -163,7 +163,7 @@ namespace librbd {
|
||||
}
|
||||
|
||||
int snapshot_add(librados::IoCtx *ioctx, const std::string &oid,
|
||||
uint64_t snap_id, const std::string &snap_name)
|
||||
snapid_t snap_id, const std::string &snap_name)
|
||||
{
|
||||
bufferlist bl, bl2;
|
||||
::encode(snap_name, bl);
|
||||
@ -173,7 +173,7 @@ namespace librbd {
|
||||
}
|
||||
|
||||
int snapshot_remove(librados::IoCtx *ioctx, const std::string &oid,
|
||||
uint64_t snap_id)
|
||||
snapid_t snap_id)
|
||||
{
|
||||
bufferlist bl, bl2;
|
||||
::encode(snap_id, bl);
|
||||
@ -219,7 +219,7 @@ namespace librbd {
|
||||
for (vector<snapid_t>::const_iterator it = ids.begin();
|
||||
it != ids.end(); ++it) {
|
||||
bufferlist bl1, bl2, bl3;
|
||||
uint64_t snap_id = it->val;
|
||||
snapid_t snap_id = it->val;
|
||||
::encode(snap_id, bl1);
|
||||
op.exec("rbd", "get_snapshot_name", bl1);
|
||||
::encode(snap_id, bl2);
|
||||
@ -270,7 +270,7 @@ namespace librbd {
|
||||
}
|
||||
|
||||
int old_snapshot_add(librados::IoCtx *ioctx, const std::string &oid,
|
||||
uint64_t snap_id, const std::string &snap_name)
|
||||
snapid_t snap_id, const std::string &snap_name)
|
||||
{
|
||||
bufferlist bl, bl2;
|
||||
::encode(snap_name, bl);
|
||||
|
@ -30,17 +30,17 @@ namespace librbd {
|
||||
uint64_t size, uint8_t order, uint64_t features,
|
||||
const std::string &object_prefix);
|
||||
int get_features(librados::IoCtx *ioctx, const std::string &oid,
|
||||
uint64_t snap_id, uint64_t *features);
|
||||
snapid_t snap_id, uint64_t *features);
|
||||
int get_object_prefix(librados::IoCtx *ioctx, const std::string &oid,
|
||||
std::string *object_prefix);
|
||||
int get_size(librados::IoCtx *ioctx, const std::string &oid,
|
||||
uint64_t snap_id, uint64_t *size, uint8_t *order);
|
||||
snapid_t snap_id, uint64_t *size, uint8_t *order);
|
||||
int set_size(librados::IoCtx *ioctx, const std::string &oid,
|
||||
uint64_t size);
|
||||
int snapshot_add(librados::IoCtx *ioctx, const std::string &oid,
|
||||
uint64_t snap_id, const std::string &snap_name);
|
||||
snapid_t snap_id, const std::string &snap_name);
|
||||
int snapshot_remove(librados::IoCtx *ioctx, const std::string &oid,
|
||||
uint64_t snap_id);
|
||||
snapid_t snap_id);
|
||||
int get_snapcontext(librados::IoCtx *ioctx, const std::string &oid,
|
||||
::SnapContext *snapc);
|
||||
int snapshot_list(librados::IoCtx *ioctx, const std::string &oid,
|
||||
@ -66,7 +66,7 @@ namespace librbd {
|
||||
// class operations on the old format, kept for
|
||||
// backwards compatability
|
||||
int old_snapshot_add(librados::IoCtx *ioctx, const std::string &oid,
|
||||
uint64_t snap_id, const std::string &snap_name);
|
||||
snapid_t snap_id, const std::string &snap_name);
|
||||
int old_snapshot_remove(librados::IoCtx *ioctx, const std::string &oid,
|
||||
const std::string &snap_name);
|
||||
int old_snapshot_list(librados::IoCtx *ioctx, const std::string &oid,
|
||||
|
Loading…
Reference in New Issue
Block a user