From: Jason Dillaman Date: Tue, 16 Jan 2018 17:49:49 +0000 (-0500) Subject: librbd: remove 'consistency' verbiage from group feature X-Git-Tag: v13.0.2~426^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4432e7eb452e660c2c0f68bc53cbe8d6b24b87d8;p=ceph.git librbd: remove 'consistency' verbiage from group feature Signed-off-by: Jason Dillaman --- diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc index 7a0aaae6835a..9b77297089e5 100644 --- a/src/cls/rbd/cls_rbd.cc +++ b/src/cls/rbd/cls_rbd.cc @@ -4738,14 +4738,14 @@ int mirror_image_map_remove(cls_method_context_t hctx, bufferlist *in, } /** - * 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) @@ -4782,7 +4782,7 @@ 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()); @@ -4801,7 +4801,7 @@ int group_dir_list(cls_method_context_t hctx, bufferlist *in, bufferlist *out) } /** - * Add a consistency group to the directory. + * Add a group to the directory. * * Input: * @param name (std::string) @@ -4815,7 +4815,7 @@ int group_dir_add(cls_method_context_t hctx, bufferlist *in, bufferlist *out) 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; } @@ -4830,7 +4830,7 @@ int group_dir_add(cls_method_context_t hctx, bufferlist *in, bufferlist *out) } 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; } @@ -4860,7 +4860,7 @@ int group_dir_add(cls_method_context_t hctx, bufferlist *in, bufferlist *out) } /** - * Remove a consistency group from the directory. + * Remove a group from the directory. * * Input: * @param name (std::string) @@ -4922,7 +4922,7 @@ int group_dir_remove(cls_method_context_t hctx, bufferlist *in, bufferlist *out) } /** - * Set state of an image in the consistency group. + * Set state of an image in the group. * * Input: * @param image_status (cls::rbd::GroupImageStatus) @@ -4955,7 +4955,7 @@ int group_image_set(cls_method_context_t hctx, bufferlist *in, bufferlist *out) } /** - * Remove reference to an image from the consistency group. + * Remove reference to an image from the group. * * Input: * @param spec (cls::rbd::GroupImageSpec) @@ -4987,7 +4987,7 @@ int group_image_remove(cls_method_context_t hctx, } /* - * List images in the consistency group. + * List images in the group. * * Input: * @param start_after which name to begin listing after @@ -5056,7 +5056,7 @@ int group_image_list(cls_method_context_t hctx, } /** - * Reference the consistency group this image belongs to. + * Reference the group this image belongs to. * * Input: * @param group_id (std::string) @@ -5097,7 +5097,8 @@ int image_add_group(cls_method_context_t hctx, } 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; } @@ -5113,7 +5114,7 @@ int image_add_group(cls_method_context_t hctx, } /** - * Remove image's pointer to the consistency group. + * Remove image's pointer to the group. * * Input: * @param cg_id (std::string) @@ -5162,7 +5163,7 @@ int image_remove_group(cls_method_context_t hctx, } /** - * 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 @@ -5353,7 +5354,7 @@ int group_snap_remove(cls_method_context_t hctx, } /** - * 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. @@ -5397,7 +5398,7 @@ int group_snap_get_by_id(cls_method_context_t hctx, } /** - * List consistency group's snapshots. + * List group's snapshots. * * Input: * @param start_after which name to begin listing after @@ -5992,7 +5993,8 @@ CLS_INIT(rbd) 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); diff --git a/src/include/rbd/librbd.h b/src/include/rbd/librbd.h index 9679db196a65..1a9c41d5bbbd 100644 --- a/src/include/rbd/librbd.h +++ b/src/include/rbd/librbd.h @@ -882,7 +882,7 @@ CEPH_RBD_API int rbd_aio_mirror_image_get_status(rbd_image_t image, size_t status_size, rbd_completion_t c); -// RBD consistency groups support functions +// RBD groups support functions CEPH_RBD_API int rbd_group_create(rados_ioctx_t p, const char *name); CEPH_RBD_API int rbd_group_remove(rados_ioctx_t p, const char *name); CEPH_RBD_API int rbd_group_list(rados_ioctx_t p, char *names, size_t *size); diff --git a/src/include/rbd/librbd.hpp b/src/include/rbd/librbd.hpp index a02d0b078b79..b77c02efe507 100644 --- a/src/include/rbd/librbd.hpp +++ b/src/include/rbd/librbd.hpp @@ -212,7 +212,7 @@ public: int mirror_image_status_summary(IoCtx& io_ctx, std::map *states); - // RBD consistency groups support functions + // RBD groups support functions int group_create(IoCtx& io_ctx, const char *group_name); int group_remove(IoCtx& io_ctx, const char *group_name); int group_list(IoCtx& io_ctx, std::vector *names); diff --git a/src/librbd/image/RefreshRequest.cc b/src/librbd/image/RefreshRequest.cc index fc5cb4752144..cc485c405a61 100644 --- a/src/librbd/image/RefreshRequest.cc +++ b/src/librbd/image/RefreshRequest.cc @@ -481,7 +481,7 @@ Context *RefreshRequest::handle_v2_get_group(int *result) { if (*result == -EOPNOTSUPP) { // Older OSD doesn't support RBD groups *result = 0; - ldout(cct, 10) << "OSD does not support consistency groups" << dendl; + ldout(cct, 10) << "OSD does not support groups" << dendl; } else if (*result < 0) { lderr(cct) << "failed to retrieve group: " << cpp_strerror(*result) << dendl; diff --git a/src/tools/rbd/Utils.cc b/src/tools/rbd/Utils.cc index 7db723201869..8d3df85ea96d 100644 --- a/src/tools/rbd/Utils.cc +++ b/src/tools/rbd/Utils.cc @@ -251,7 +251,7 @@ int get_special_pool_group_names(const po::variables_map &vm, } if (group_name->empty()) { - std::cerr << "rbd: consistency group name was not specified" << std::endl; + std::cerr << "rbd: group name was not specified" << std::endl; return -EINVAL; } diff --git a/src/tools/rbd/action/Remove.cc b/src/tools/rbd/action/Remove.cc index 420c66dbe677..d6eb2d01ef91 100644 --- a/src/tools/rbd/action/Remove.cc +++ b/src/tools/rbd/action/Remove.cc @@ -79,13 +79,13 @@ int execute(const po::variables_map &vm, image_r = image.get_group(&group_spec); } if (image_r == 0) - std::cerr << "rbd: error: image belongs to a consistency group " + std::cerr << "rbd: error: image belongs to a group " << group_spec.pool << "." << group_spec.name; else - std::cerr << "rbd: error: image belongs to a consistency group"; + std::cerr << "rbd: error: image belongs to a group"; std::cerr << std::endl - << "Remove the image from the consistency group and try again." + << "Remove the image from the group and try again." << std::endl; image.close(); } else { diff --git a/src/tools/rbd/action/Trash.cc b/src/tools/rbd/action/Trash.cc index cc80bfdf1760..b1ad5ade30e7 100644 --- a/src/tools/rbd/action/Trash.cc +++ b/src/tools/rbd/action/Trash.cc @@ -122,7 +122,7 @@ void remove_error_check(int r) { << std::endl; } else if (r == -EMLINK) { std::cerr << std::endl - << "Remove the image from the consistency group and try again." + << "Remove the image from the group and try again." << std::endl; } else if (r == -EPERM) { std::cerr << std::endl