From 5aed163b7590dcd74ab98edac5ebd992f8a481fd Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Tue, 26 Dec 2017 01:51:12 -0500 Subject: [PATCH] objclass: Use unqualified encode/decode This is a portion of Part 1 of the namespace project: using ADL properly in encode and decode so we can use namespaces easily in Ceph. Signed-off-by: Adam C. Emerson --- src/objclass/class_api.cc | 50 +++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/objclass/class_api.cc b/src/objclass/class_api.cc index e480b8be05735..496f80d384b7d 100644 --- a/src/objclass/class_api.cc +++ b/src/objclass/class_api.cc @@ -234,8 +234,8 @@ int cls_cxx_stat(cls_method_context_t hctx, uint64_t *size, time_t *mtime) utime_t ut; uint64_t s; try { - ::decode(s, iter); - ::decode(ut, iter); + decode(s, iter); + decode(ut, iter); } catch (buffer::error& err) { return -EIO; } @@ -259,8 +259,8 @@ int cls_cxx_stat2(cls_method_context_t hctx, uint64_t *size, ceph::real_time *mt real_time ut; uint64_t s; try { - ::decode(s, iter); - ::decode(ut, iter); + decode(s, iter); + decode(ut, iter); } catch (buffer::error& err) { return -EIO; } @@ -370,7 +370,7 @@ int cls_cxx_getxattrs(cls_method_context_t hctx, map *attrse bufferlist::iterator iter = op.outdata.begin(); try { - ::decode(*attrset, iter); + decode(*attrset, iter); } catch (buffer::error& err) { return -EIO; } @@ -417,9 +417,9 @@ int cls_cxx_map_get_all_vals(cls_method_context_t hctx, map* string filter_prefix; uint64_t max = (uint64_t)-1; - ::encode(start_after, op.indata); - ::encode(max, op.indata); - ::encode(filter_prefix, op.indata); + encode(start_after, op.indata); + encode(max, op.indata); + encode(filter_prefix, op.indata); op.op.op = CEPH_OSD_OP_OMAPGETVALS; @@ -429,8 +429,8 @@ int cls_cxx_map_get_all_vals(cls_method_context_t hctx, map* bufferlist::iterator iter = op.outdata.begin(); try { - ::decode(*vals, iter); - ::decode(*more, iter); + decode(*vals, iter); + decode(*more, iter); } catch (buffer::error& err) { return -EIO; } @@ -446,8 +446,8 @@ int cls_cxx_map_get_keys(cls_method_context_t hctx, const string &start_obj, OSDOp& op = ops[0]; int ret; - ::encode(start_obj, op.indata); - ::encode(max_to_get, op.indata); + encode(start_obj, op.indata); + encode(max_to_get, op.indata); op.op.op = CEPH_OSD_OP_OMAPGETKEYS; @@ -457,8 +457,8 @@ int cls_cxx_map_get_keys(cls_method_context_t hctx, const string &start_obj, bufferlist::iterator iter = op.outdata.begin(); try { - ::decode(*keys, iter); - ::decode(*more, iter); + decode(*keys, iter); + decode(*more, iter); } catch (buffer::error& err) { return -EIO; } @@ -474,9 +474,9 @@ int cls_cxx_map_get_vals(cls_method_context_t hctx, const string &start_obj, OSDOp& op = ops[0]; int ret; - ::encode(start_obj, op.indata); - ::encode(max_to_get, op.indata); - ::encode(filter_prefix, op.indata); + encode(start_obj, op.indata); + encode(max_to_get, op.indata); + encode(filter_prefix, op.indata); op.op.op = CEPH_OSD_OP_OMAPGETVALS; @@ -486,8 +486,8 @@ int cls_cxx_map_get_vals(cls_method_context_t hctx, const string &start_obj, bufferlist::iterator iter = op.outdata.begin(); try { - ::decode(*vals, iter); - ::decode(*more, iter); + decode(*vals, iter); + decode(*more, iter); } catch (buffer::error& err) { return -EIO; } @@ -520,7 +520,7 @@ int cls_cxx_map_get_val(cls_method_context_t hctx, const string &key, set k; k.insert(key); - ::encode(k, op.indata); + encode(k, op.indata); op.op.op = CEPH_OSD_OP_OMAPGETVALSBYKEYS; ret = (*pctx)->pg->do_osd_ops(*pctx, ops); @@ -531,7 +531,7 @@ int cls_cxx_map_get_val(cls_method_context_t hctx, const string &key, try { map m; - ::decode(m, iter); + decode(m, iter); map::iterator iter = m.begin(); if (iter == m.end()) return -ENOENT; @@ -552,7 +552,7 @@ int cls_cxx_map_set_val(cls_method_context_t hctx, const string &key, bufferlist& update_bl = op.indata; map m; m[key] = *inbl; - ::encode(m, update_bl); + encode(m, update_bl); op.op.op = CEPH_OSD_OP_OMAPSETVALS; @@ -566,7 +566,7 @@ int cls_cxx_map_set_vals(cls_method_context_t hctx, vector ops(1); OSDOp& op = ops[0]; bufferlist& update_bl = op.indata; - ::encode(*map, update_bl); + encode(*map, update_bl); op.op.op = CEPH_OSD_OP_OMAPSETVALS; @@ -605,7 +605,7 @@ int cls_cxx_map_remove_key(cls_method_context_t hctx, const string &key) set to_rm; to_rm.insert(key); - ::encode(to_rm, update_bl); + encode(to_rm, update_bl); op.op.op = CEPH_OSD_OP_OMAPRMKEYS; @@ -627,7 +627,7 @@ int cls_cxx_list_watchers(cls_method_context_t hctx, bufferlist::iterator iter = op.outdata.begin(); try { - ::decode(*watchers, iter); + decode(*watchers, iter); } catch (buffer::error& err) { return -EIO; } -- 2.39.5