Signed-off-by: songweibin <song.weibin@zte.com.cn>
const char *old_snap_name,
const char *new_snap_name) {
CephContext *cct = (CephContext *)group_ioctx.cct();
+ if (0 == strcmp(old_snap_name, new_snap_name))
+ return -EEXIST;
std::string group_id;
int r = cls_client::dir_get_id(&group_ioctx, RBD_GROUP_DIRECTORY,
template <typename ImageCtxT = librbd::ImageCtx>
struct Group {
- static int create(librados::IoCtx& io_ctx, const char *imgname);
+ static int create(librados::IoCtx& io_ctx, const char *group_name);
static int remove(librados::IoCtx& io_ctx, const char *group_name);
static int list(librados::IoCtx& io_ctx, std::vector<std::string> *names);