}
/**
- * List consistency groups from the directory.
+ * List groups from the directory.
*
* Input:
* @param start_after (std::string)
* @param max_return (int64_t)
*
* Output:
- * @param map of consistency groups (name, id)
+ * @param map of groups (name, id)
* @return 0 on success, negative error code on failure
*/
int group_dir_list(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
try {
decode(id, iter);
} catch (const buffer::error &err) {
- CLS_ERR("could not decode id of consistency group '%s'", val.first.c_str());
+ CLS_ERR("could not decode id of group '%s'", val.first.c_str());
return -EIO;
}
CLS_LOG(20, "adding '%s' -> '%s'", dir_name_from_key(val.first).c_str(), id.c_str());
}
/**
- * Add a consistency group to the directory.
+ * Add a group to the directory.
*
* Input:
* @param name (std::string)
int r = cls_cxx_create(hctx, false);
if (r < 0) {
- CLS_ERR("could not create consistency group directory: %s",
+ CLS_ERR("could not create group directory: %s",
cpp_strerror(r).c_str());
return r;
}
}
if (!name.size() || !is_valid_id(id)) {
- CLS_ERR("invalid consistency group name '%s' or id '%s'",
+ CLS_ERR("invalid group name '%s' or id '%s'",
name.c_str(), id.c_str());
return -EINVAL;
}
}
/**
- * Remove a consistency group from the directory.
+ * Remove a group from the directory.
*
* Input:
* @param name (std::string)
}
/**
- * Set state of an image in the consistency group.
+ * Set state of an image in the group.
*
* Input:
* @param image_status (cls::rbd::GroupImageStatus)
}
/**
- * Remove reference to an image from the consistency group.
+ * Remove reference to an image from the group.
*
* Input:
* @param spec (cls::rbd::GroupImageSpec)
}
/*
- * List images in the consistency group.
+ * List images in the group.
*
* Input:
* @param start_after which name to begin listing after
}
/**
- * Reference the consistency group this image belongs to.
+ * Reference the group this image belongs to.
*
* Input:
* @param group_id (std::string)
} else {
return 0; // In this case the values are already correct
}
- } else if (r < 0 && r != -ENOENT) { // No entry means this image is not a member of any consistency group. So, we can use it.
+ } else if (r < 0 && r != -ENOENT) {
+ // No entry means this image is not a member of any group. So, we can use it.
return r;
}
}
/**
- * Remove image's pointer to the consistency group.
+ * Remove image's pointer to the group.
*
* Input:
* @param cg_id (std::string)
}
/**
- * Retrieve the id and pool of the consistency group this image belongs to.
+ * Retrieve the id and pool of the group this image belongs to.
*
* Input:
* none
}
/**
- * Get consistency group's snapshot by id.
+ * Get group's snapshot by id.
*
* Input:
* @param snapshot_id the id of the snapshot to look for.
}
/**
- * List consistency group's snapshots.
+ * List group's snapshots.
*
* Input:
* @param start_after which name to begin listing after
cls_register_cxx_method(h_class, "mirror_image_map_remove",
CLS_METHOD_WR, mirror_image_map_remove,
&h_mirror_image_map_remove);
- /* methods for the consistency groups feature */
+
+ /* methods for the groups feature */
cls_register_cxx_method(h_class, "group_dir_list",
CLS_METHOD_RD,
group_dir_list, &h_group_dir_list);