]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
key_value_store: Use unqualified encode/decode
authorAdam C. Emerson <aemerson@redhat.com>
Sat, 23 Dec 2017 04:48:20 +0000 (23:48 -0500)
committerAdam C. Emerson <aemerson@redhat.com>
Wed, 10 Jan 2018 19:02:09 +0000 (14:02 -0500)
This is a portion of the namespace project.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/key_value_store/cls_kvs.cc
src/key_value_store/kv_flat_btree_async.cc
src/key_value_store/kv_flat_btree_async.h
src/key_value_store/kvs_arg_types.h

index 183c8d6f9468b024198bd9ba431564c0dd5425e1..42613a1041a1b875afe7e0ea5a63c86a6399cab9 100644 (file)
@@ -72,7 +72,7 @@ static int get_idata_from_key_op(cls_method_context_t hctx,
   idata_from_key_args op;
   bufferlist::iterator it = in->begin();
   try {
-    ::decode(op, it);
+    decode(op, it);
   } catch (buffer::error& err) {
     CLS_LOG(20, "error decoding idata_from_key_args.");
     return -EINVAL;
@@ -81,7 +81,7 @@ static int get_idata_from_key_op(cls_method_context_t hctx,
   if (r < 0) {
     return r;
   } else {
-    ::encode(op, *out);
+    encode(op, *out);
     return 0;
   }
 }
@@ -125,7 +125,7 @@ static int get_next_idata_op(cls_method_context_t hctx,
   idata_from_idata_args op;
   bufferlist::iterator it = in->begin();
   try {
-    ::decode(op, it);
+    decode(op, it);
   } catch (buffer::error& err) {
     return -EINVAL;
   }
@@ -187,7 +187,7 @@ static int get_prev_idata_op(cls_method_context_t hctx,
   idata_from_idata_args op;
   bufferlist::iterator it = in->begin();
   try {
-    ::decode(op, it);
+    decode(op, it);
   } catch (buffer::error& err) {
     return -EINVAL;
   }
@@ -231,7 +231,7 @@ static int read_many_op(cls_method_context_t hctx, bufferlist *in,
   map<string, bufferlist> outmap;
   bufferlist::iterator it = in->begin();
   try {
-    ::decode(op, it);
+    decode(op, it);
   } catch (buffer::error & err) {
     return -EINVAL;
   }
@@ -318,7 +318,7 @@ static int assert_size_in_bound_op(cls_method_context_t hctx,
   assert_size_args op;
   bufferlist::iterator it = in->begin();
   try {
-    ::decode(op, it);
+    decode(op, it);
   } catch (buffer::error& err) {
     return -EINVAL;
   }
@@ -414,7 +414,7 @@ static int omap_insert_op(cls_method_context_t hctx,
   omap_set_args op;
   bufferlist::iterator it = in->begin();
   try {
-    ::decode(op, it);
+    decode(op, it);
   } catch (buffer::error& err) {
     return -EINVAL;
   }
@@ -468,7 +468,7 @@ static int create_with_omap_op(cls_method_context_t hctx,
   map<string, bufferlist> omap;
   bufferlist::iterator it = in->begin();
   try {
-    ::decode(omap, it);
+    decode(omap, it);
   } catch (buffer::error& err) {
     return -EINVAL;
   }
@@ -559,7 +559,7 @@ static int omap_remove_op(cls_method_context_t hctx,
   omap_rm_args op;
   bufferlist::iterator it = in->begin();
   try {
-    ::decode(op, it);
+    decode(op, it);
   } catch (buffer::error& err) {
     return -EINVAL;
   }
@@ -623,7 +623,7 @@ static int maybe_read_for_balance_op(cls_method_context_t hctx,
   rebalance_args op;
   bufferlist::iterator it = in->begin();
   try {
-    ::decode(op, it);
+    decode(op, it);
   } catch (buffer::error& err) {
     return -EINVAL;
   }
index 25dc5c1f6b7e6ea092c68e26391bb57cc7ee55d3..34839aa20b97a77b80d33024ba8d436aa6ee1035 100644 (file)
@@ -810,7 +810,7 @@ void KvFlatBtreeAsync::set_up_make_object(
     const map<std::string, bufferlist> &to_set,
     librados::ObjectWriteOperation *owo) {
   bufferlist inbl;
-  ::encode(to_set, inbl);
+  encode(to_set, inbl);
   owo->exec("kvs", "create_with_omap", inbl);
 }
 
@@ -1826,7 +1826,7 @@ int KvFlatBtreeAsync::set_many(const map<string, bufferlist> &in_map) {
 
   if (verbose) cout << "created key set and big_map" << std::endl;
 
-  ::encode(keys, inbl);
+  encode(keys, inbl);
   librados::AioCompletion * aioc = rados.aio_create_completion();
   io_ctx.aio_exec(index_name, aioc,  "kvs", "read_many", inbl, &outbl);
   aioc->wait_for_safe();
@@ -1839,7 +1839,7 @@ int KvFlatBtreeAsync::set_many(const map<string, bufferlist> &in_map) {
 
   map<string, bufferlist> imap;//read from the index
   bufferlist::iterator blit = outbl.begin();
-  ::decode(imap, blit);
+  decode(imap, blit);
 
   if (verbose) cout << "finished reading index for objects. there are "
       << imap.size() << " entries that need to be changed. " << std::endl;
index 2b3761850e9595c570188c9675d40ba3426b6798..be356b9f120b0bb6c317ea506b5035020e5a40f2 100644 (file)
@@ -104,14 +104,14 @@ struct key_data {
 
   void encode(bufferlist &bl) const {
     ENCODE_START(1,1,bl);
-    ::encode(raw_key, bl);
-    ::encode(prefix, bl);
+    encode(raw_key, bl);
+    encode(prefix, bl);
     ENCODE_FINISH(bl);
   }
   void decode(bufferlist::iterator &p) {
     DECODE_START(1, p);
-    ::decode(raw_key, p);
-    ::decode(prefix, p);
+    decode(raw_key, p);
+    decode(prefix, p);
     DECODE_FINISH(p);
   }
 };
@@ -175,24 +175,24 @@ struct object_data {
 
   void encode(bufferlist &bl) const {
     ENCODE_START(1,1,bl);
-    ::encode(min_kdata, bl);
-    ::encode(max_kdata, bl);
-    ::encode(name, bl);
-    ::encode(omap, bl);
-    ::encode(unwritable, bl);
-    ::encode(version, bl);
-    ::encode(size, bl);
+    encode(min_kdata, bl);
+    encode(max_kdata, bl);
+    encode(name, bl);
+    encode(omap, bl);
+    encode(unwritable, bl);
+    encode(version, bl);
+    encode(size, bl);
     ENCODE_FINISH(bl);
   }
   void decode(bufferlist::iterator &p) {
     DECODE_START(1, p);
-    ::decode(min_kdata, p);
-    ::decode(max_kdata, p);
-    ::decode(name, p);
-    ::decode(omap, p);
-    ::decode(unwritable, p);
-    ::decode(version, p);
-    ::decode(size, p);
+    decode(min_kdata, p);
+    decode(max_kdata, p);
+    decode(name, p);
+    decode(omap, p);
+    decode(unwritable, p);
+    decode(version, p);
+    decode(size, p);
     DECODE_FINISH(p);
   }
 };
@@ -231,16 +231,16 @@ struct create_data {
 
   void encode(bufferlist &bl) const {
     ENCODE_START(1,1,bl);
-    ::encode(min, bl);
-    ::encode(max, bl);
-    ::encode(obj, bl);
+    encode(min, bl);
+    encode(max, bl);
+    encode(obj, bl);
     ENCODE_FINISH(bl);
   }
   void decode(bufferlist::iterator &p) {
     DECODE_START(1, p);
-    ::decode(min, p);
-    ::decode(max, p);
-    ::decode(obj, p);
+    decode(min, p);
+    decode(max, p);
+    decode(obj, p);
     DECODE_FINISH(p);
   }
 };
@@ -278,18 +278,18 @@ struct delete_data {
 
   void encode(bufferlist &bl) const {
     ENCODE_START(1,1,bl);
-    ::encode(min, bl);
-    ::encode(max, bl);
-    ::encode(obj, bl);
-    ::encode(version, bl);
+    encode(min, bl);
+    encode(max, bl);
+    encode(obj, bl);
+    encode(version, bl);
     ENCODE_FINISH(bl);
   }
   void decode(bufferlist::iterator &p) {
     DECODE_START(1, p);
-    ::decode(min, p);
-    ::decode(max, p);
-    ::decode(obj, p);
-    ::decode(version, p);
+    decode(min, p);
+    decode(max, p);
+    decode(obj, p);
+    decode(version, p);
     DECODE_FINISH(p);
   }
 };
@@ -354,24 +354,24 @@ struct index_data {
 
   void encode(bufferlist &bl) const {
     ENCODE_START(1,1,bl);
-    ::encode(prefix, bl);
-    ::encode(min_kdata, bl);
-    ::encode(kdata, bl);
-    ::encode(ts, bl);
-    ::encode(to_create, bl);
-    ::encode(to_delete, bl);
-    ::encode(obj, bl);
+    encode(prefix, bl);
+    encode(min_kdata, bl);
+    encode(kdata, bl);
+    encode(ts, bl);
+    encode(to_create, bl);
+    encode(to_delete, bl);
+    encode(obj, bl);
     ENCODE_FINISH(bl);
   }
   void decode(bufferlist::iterator &p) {
     DECODE_START(1, p);
-    ::decode(prefix, p);
-    ::decode(min_kdata, p);
-    ::decode(kdata, p);
-    ::decode(ts, p);
-    ::decode(to_create, p);
-    ::decode(to_delete, p);
-    ::decode(obj, p);
+    decode(prefix, p);
+    decode(min_kdata, p);
+    decode(kdata, p);
+    decode(ts, p);
+    decode(to_create, p);
+    decode(to_delete, p);
+    decode(obj, p);
     DECODE_FINISH(p);
   }
 
index 98063621e38e5e664ad7704d92467dc1cd7f97c0..1306f87fed704d02ac6304f23e20682256822e41 100644 (file)
@@ -23,14 +23,14 @@ struct assert_size_args {
 
   void encode(bufferlist &bl) const {
     ENCODE_START(1,1,bl);
-    ::encode(bound, bl);
-    ::encode(comparator, bl);
+    encode(bound, bl);
+    encode(comparator, bl);
     ENCODE_FINISH(bl);
   }
   void decode(bufferlist::iterator &p) {
     DECODE_START(1, p);
-    ::decode(bound, p);
-    ::decode(comparator, p);
+    decode(bound, p);
+    decode(comparator, p);
     DECODE_FINISH(p);
   }
 };
@@ -43,16 +43,16 @@ struct idata_from_key_args {
 
   void encode(bufferlist &bl) const {
     ENCODE_START(1,1,bl);
-    ::encode(key, bl);
-    ::encode(idata, bl);
-    ::encode(next_idata, bl);
+    encode(key, bl);
+    encode(idata, bl);
+    encode(next_idata, bl);
     ENCODE_FINISH(bl);
   }
   void decode(bufferlist::iterator &p) {
     DECODE_START(1, p);
-    ::decode(key, p);
-    ::decode(idata, p);
-    ::decode(next_idata, p);
+    decode(key, p);
+    decode(idata, p);
+    decode(next_idata, p);
     DECODE_FINISH(p);
   }
 };
@@ -64,14 +64,14 @@ struct idata_from_idata_args {
 
   void encode(bufferlist &bl) const {
     ENCODE_START(1,1,bl);
-    ::encode(idata, bl);
-    ::encode(next_idata, bl);
+    encode(idata, bl);
+    encode(next_idata, bl);
     ENCODE_FINISH(bl);
   }
   void decode(bufferlist::iterator &p) {
     DECODE_START(1, p);
-    ::decode(idata, p);
-    ::decode(next_idata, p);
+    decode(idata, p);
+    decode(next_idata, p);
     DECODE_FINISH(p);
   }
 };
@@ -84,16 +84,16 @@ struct omap_set_args {
 
   void encode(bufferlist &bl) const {
     ENCODE_START(1,1,bl);
-    ::encode(omap, bl);
-    ::encode(bound, bl);
-    ::encode(exclusive, bl);
+    encode(omap, bl);
+    encode(bound, bl);
+    encode(exclusive, bl);
     ENCODE_FINISH(bl);
   }
   void decode(bufferlist::iterator &p) {
     DECODE_START(1, p);
-    ::decode(omap, p);
-    ::decode(bound, p);
-    ::decode(exclusive, p);
+    decode(omap, p);
+    decode(bound, p);
+    decode(exclusive, p);
     DECODE_FINISH(p);
   }
 };
@@ -105,14 +105,14 @@ struct omap_rm_args {
 
   void encode(bufferlist &bl) const {
     ENCODE_START(1,1,bl);
-    ::encode(omap, bl);
-    ::encode(bound, bl);
+    encode(omap, bl);
+    encode(bound, bl);
     ENCODE_FINISH(bl);
   }
   void decode(bufferlist::iterator &p) {
     DECODE_START(1, p);
-    ::decode(omap, p);
-    ::decode(bound, p);
+    decode(omap, p);
+    decode(bound, p);
     DECODE_FINISH(p);
   }
 };
@@ -125,16 +125,16 @@ struct rebalance_args {
 
   void encode(bufferlist &bl) const {
     ENCODE_START(1,1,bl);
-    ::encode(odata, bl);
-    ::encode(bound, bl);
-    ::encode(comparator, bl);
+    encode(odata, bl);
+    encode(bound, bl);
+    encode(comparator, bl);
     ENCODE_FINISH(bl);
   }
   void decode(bufferlist::iterator &p) {
     DECODE_START(1, p);
-    ::decode(odata,p);
-    ::decode(bound, p);
-    ::decode(comparator, p);
+    decode(odata,p);
+    decode(bound, p);
+    decode(comparator, p);
     DECODE_FINISH(p);
   }
 };