mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
librbd: Fix typo and prefix ++
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
This commit is contained in:
parent
ba112d599d
commit
978d7b4713
@ -105,7 +105,7 @@ cls_method_handle_t h_old_snapshot_add;
|
||||
cls_method_handle_t h_old_snapshot_remove;
|
||||
|
||||
#define RBD_MAX_KEYS_READ 64
|
||||
#define RBD_MAX_MEATADATA_KEYS 1024
|
||||
#define RBD_MAX_METAADATA_KEYS 1024
|
||||
#define RBD_SNAP_KEY_PREFIX "snapshot_"
|
||||
#define RBD_DIR_ID_KEY_PREFIX "id_"
|
||||
#define RBD_DIR_NAME_KEY_PREFIX "name_"
|
||||
@ -2139,7 +2139,7 @@ int metadata_list(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
|
||||
map<string, bufferlist> vals;
|
||||
map<string, string> out_map;
|
||||
int r = cls_cxx_map_get_vals(hctx, RBD_METADATA_KEY_PREFIX, RBD_METADATA_KEY_PREFIX,
|
||||
RBD_MAX_MEATADATA_KEYS, &vals);
|
||||
RBD_MAX_METAADATA_KEYS, &vals);
|
||||
if (r < 0) {
|
||||
CLS_ERR("failed to read the vals off of disk: %s", cpp_strerror(r).c_str());
|
||||
return r;
|
||||
|
@ -1149,7 +1149,7 @@ reprotect_and_return_err:
|
||||
lderr(cct) << "couldn't list metadata: " << r << dendl;
|
||||
goto err_close_child;
|
||||
}
|
||||
for (map<string, string>::iterator it = pairs.begin(); it != pairs.end(); it++) {
|
||||
for (map<string, string>::iterator it = pairs.begin(); it != pairs.end(); ++it) {
|
||||
r = cls_client::metadata_set(&c_ioctx, c_imctx->header_oid,
|
||||
it->first, it->second);
|
||||
if (r < 0) {
|
||||
@ -2284,7 +2284,7 @@ reprotect_and_return_err:
|
||||
lderr(cct) << "couldn't list metadata: " << r << dendl;
|
||||
return r;
|
||||
}
|
||||
for (map<string, string>::iterator it = pairs.begin(); it != pairs.end(); it++) {
|
||||
for (map<string, string>::iterator it = pairs.begin(); it != pairs.end(); ++it) {
|
||||
r = cls_client::metadata_set(&dest->md_ctx, dest->header_oid, it->first, it->second);
|
||||
if (r < 0) {
|
||||
lderr(cct) << "couldn't set metadata: " << r << dendl;
|
||||
|
@ -2957,8 +2957,7 @@ if (!set_conf_param(v, p1, p2, p3)) { \
|
||||
opt_cmd != OPT_INFO && opt_cmd != OPT_LIST &&
|
||||
opt_cmd != OPT_SNAP_LIST && opt_cmd != OPT_LOCK_LIST &&
|
||||
opt_cmd != OPT_CHILDREN && opt_cmd != OPT_DIFF &&
|
||||
opt_cmd != OPT_METADATA_LIST && opt_cmd != OPT_DIFF &&
|
||||
opt_cmd != OPT_STATUS) {
|
||||
opt_cmd != OPT_METADATA_LIST && opt_cmd != OPT_STATUS) {
|
||||
cerr << "rbd: command doesn't use output formatting"
|
||||
<< std::endl;
|
||||
return EXIT_FAILURE;
|
||||
@ -3578,7 +3577,7 @@ if (!set_conf_param(v, p1, p2, p3)) { \
|
||||
case OPT_METADATA_SET:
|
||||
r = do_metadata_set(image, key, value);
|
||||
if (r < 0) {
|
||||
cerr << "rbd: listing metadata failed: " << cpp_strerror(r) << std::endl;
|
||||
cerr << "rbd: setting metadata failed: " << cpp_strerror(r) << std::endl;
|
||||
return -r;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user