]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/cls/user/cls_user_client.cc
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / cls / user / cls_user_client.cc
index 5e0d65a8dbd3e064aed0b6a792f249736ee972a5..c18be4a2649287fa3cfdefb28e86ab858c8841a8 100644 (file)
@@ -1,4 +1,4 @@
-// -*- mode:C; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
 #include <errno.h>
@@ -17,7 +17,7 @@ void cls_user_set_buckets(librados::ObjectWriteOperation& op, list<cls_user_buck
   call.entries = entries;
   call.add = add;
   call.time = real_clock::now();
-  ::encode(call, in);
+  encode(call, in);
   op.exec("user", "set_buckets_info", in);
 }
 
@@ -26,7 +26,7 @@ void cls_user_complete_stats_sync(librados::ObjectWriteOperation& op)
   bufferlist in;
   cls_user_complete_stats_sync_op call;
   call.time = real_clock::now();
-  ::encode(call, in);
+  encode(call, in);
   op.exec("user", "complete_stats_sync", in);
 }
 
@@ -35,7 +35,7 @@ void cls_user_remove_bucket(librados::ObjectWriteOperation& op, const cls_user_b
   bufferlist in;
   cls_user_remove_bucket_op call;
   call.bucket = bucket;
-  ::encode(call, in);
+  encode(call, in);
   op.exec("user", "remove_bucket", in);
 }
 
@@ -51,8 +51,8 @@ public:
     if (r >= 0) {
       cls_user_list_buckets_ret ret;
       try {
-        bufferlist::iterator iter = outbl.begin();
-        ::decode(ret, iter);
+        auto iter = outbl.cbegin();
+        decode(ret, iter);
         if (entries)
          *entries = ret.entries;
         if (truncated)
@@ -84,7 +84,7 @@ void cls_user_bucket_list(librados::ObjectReadOperation& op,
   call.end_marker = end_marker;
   call.max_entries = max_entries;
 
-  ::encode(call, inbl);
+  encode(call, inbl);
 
   op.exec("user", "list_buckets", inbl, new ClsUserListCtx(&entries, out_marker, truncated, pret));
 }
@@ -104,8 +104,8 @@ public:
     if (r >= 0) {
       cls_user_get_header_ret ret;
       try {
-        bufferlist::iterator iter = outbl.begin();
-        ::decode(ret, iter);
+        auto iter = outbl.cbegin();
+        decode(ret, iter);
         if (header)
          *header = ret.header;
       } catch (buffer::error& err) {
@@ -127,7 +127,7 @@ void cls_user_get_header(librados::ObjectReadOperation& op,
   bufferlist inbl;
   cls_user_get_header_op call;
 
-  ::encode(call, inbl);
+  encode(call, inbl);
 
   op.exec("user", "get_header", inbl, new ClsUserGetHeaderCtx(header, NULL, pret));
 }
@@ -137,7 +137,7 @@ void cls_user_reset_stats(librados::ObjectWriteOperation &op)
   bufferlist inbl;
   cls_user_reset_stats_op call;
   call.time = real_clock::now();
-  ::encode(call, inbl);
+  encode(call, inbl);
   op.exec("user", "reset_user_stats", inbl);
 }
 
@@ -145,7 +145,7 @@ int cls_user_get_header_async(IoCtx& io_ctx, string& oid, RGWGetUserHeader_CB *c
 {
   bufferlist in, out;
   cls_user_get_header_op call;
-  ::encode(call, in);
+  encode(call, in);
   ObjectReadOperation op;
   op.exec("user", "get_header", in, new ClsUserGetHeaderCtx(NULL, ctx, NULL)); /* no need to pass pret, as we'll call ctx->handle_response() with correct error */
   AioCompletion *c = librados::Rados::aio_create_completion(NULL, NULL, NULL);