summaryrefslogtreecommitdiffstats
path: root/src/objclass
diff options
context:
space:
mode:
authorAdam C. Emerson <aemerson@redhat.com>2017-12-26 07:51:12 +0100
committerAdam C. Emerson <aemerson@redhat.com>2018-01-10 20:02:09 +0100
commit5aed163b7590dcd74ab98edac5ebd992f8a481fd (patch)
treed837a5f2be3816b748eeaddc2c6737fa59c0a956 /src/objclass
parentmsg: Use unqualified encode/decode (diff)
downloadceph-5aed163b7590dcd74ab98edac5ebd992f8a481fd.tar.xz
ceph-5aed163b7590dcd74ab98edac5ebd992f8a481fd.zip
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 <aemerson@redhat.com>
Diffstat (limited to 'src/objclass')
-rw-r--r--src/objclass/class_api.cc50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/objclass/class_api.cc b/src/objclass/class_api.cc
index e480b8be057..496f80d384b 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<string, bufferlist> *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, bufferlist>*
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<string, bufferlist>*
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<string> 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<string, bufferlist> m;
- ::decode(m, iter);
+ decode(m, iter);
map<string, bufferlist>::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<string, bufferlist> 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<OSDOp> 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<string> 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;
}