]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls: CLS_CLIET_HIDE_IOCTX changes in cls headers 28569/head
authorAli Maredia <amaredia@redhat.com>
Fri, 30 Aug 2019 21:13:47 +0000 (17:13 -0400)
committerAli Maredia <amaredia@redhat.com>
Mon, 30 Sep 2019 19:48:58 +0000 (15:48 -0400)
Signed-off-by: Ali Maredia <amaredia@redhat.com>
src/cls/log/cls_log_client.h
src/cls/otp/cls_otp_client.h
src/cls/refcount/cls_refcount_client.h
src/cls/timeindex/cls_timeindex_client.h
src/cls/version/cls_version_client.h

index 059e7750216f62c8e5f8f92edfd769b7f80e1679..b994206bec6d8e6b315b3c4d1442e32c4429d32c 100644 (file)
@@ -24,6 +24,8 @@ void cls_log_list(librados::ObjectReadOperation& op, utime_t& from, utime_t& to,
 void cls_log_trim(librados::ObjectWriteOperation& op, const utime_t& from_time, const utime_t& to_time,
                   const string& from_marker, const string& to_marker);
 
+// these overloads which call io_ctx.operate() should not be called in the rgw.
+// rgw_rados_operate() should be called after the overloads w/o calls to io_ctx.operate()
 #ifndef CLS_CLIENT_HIDE_IOCTX
 int cls_log_trim(librados::IoCtx& io_ctx, const string& oid, const utime_t& from_time, const utime_t& to_time,
                  const string& from_marker, const string& to_marker);
index f19c945911a45275b56dd83fffb3b4a7fc7c7262..f1dec9f5681f2b1e9a13cb7e07df6636603f2eb5 100644 (file)
@@ -16,19 +16,23 @@ namespace rados {
         static void create(librados::ObjectWriteOperation *op, const otp_info_t& config);
         static void set(librados::ObjectWriteOperation *op, const list<otp_info_t>& entries);
         static void remove(librados::ObjectWriteOperation *op, const string& id);
-        static int get(librados::ObjectReadOperation *op,
-                       librados::IoCtx& ioctx, const string& oid,
-                       const list<string> *ids, bool get_all, list<otp_info_t> *result);
         static int get(librados::ObjectReadOperation *op,
                        librados::IoCtx& ioctx, const string& oid,
                        const string& id, otp_info_t *result);
         static int get_all(librados::ObjectReadOperation *op,
                            librados::IoCtx& ioctx, const string& oid,
                            list<otp_info_t> *result);
+// these overloads which call io_ctx.operate() or io_ctx.exec() should not be called in the rgw.
+// rgw_rados_operate() should be called after the overloads w/o calls to io_ctx.operate()/exec()
+#ifndef CLS_CLIENT_HIDE_IOCTX
+        static int get(librados::ObjectReadOperation *op,
+                       librados::IoCtx& ioctx, const string& oid,
+                       const list<string> *ids, bool get_all, list<otp_info_t> *result);
         static int check(CephContext *cct, librados::IoCtx& ioctx, const string& oid,
                          const string& id, const string& val, otp_check_t *result);
         static int get_current_time(librados::IoCtx& ioctx, const string& oid,
                                     ceph::real_time *result);
+#endif
       };
 
       class TOTPConfig {
index c41a4f6c03b48d0be6ffdfca5919061452625341..756a971a328c29b03250af5d8b09bc51aafef3ec 100644 (file)
 void cls_refcount_get(librados::ObjectWriteOperation& op, const string& tag, bool implicit_ref = false);
 void cls_refcount_put(librados::ObjectWriteOperation& op, const string& tag, bool implicit_ref = false);
 void cls_refcount_set(librados::ObjectWriteOperation& op, list<string>& refs);
+// these overloads which call io_ctx.operate() or io_ctx.exec() should not be called in the rgw.
+// rgw_rados_operate() should be called after the overloads w/o calls to io_ctx.operate()/exec()
+#ifndef CLS_CLIENT_HIDE_IOCTX
 int cls_refcount_read(librados::IoCtx& io_ctx, string& oid, list<string> *refs, bool implicit_ref = false);
+#endif
 
 #endif
index 49fa5ce4afcc6c1791fdbb10aae25d828f469fa1..ce6392f6d1395dc873d3429d72340bae745c1301 100644 (file)
@@ -83,6 +83,8 @@ void cls_timeindex_trim(
   const std::string& from_marker = std::string(),
   const std::string& to_marker = std::string());
 
+// these overloads which call io_ctx.operate() should not be called in the rgw.
+// rgw_rados_operate() should be called after the overloads w/o calls to io_ctx.operate()
 #ifndef CLS_CLIENT_HIDE_IOCTX
 int cls_timeindex_trim(
   librados::IoCtx& io_ctx,
index 01e7d52cfcb5fc72892e99f6be0119ddd0301750..5dc039bcbe1e57f49ccb180f5fb58d515082d30e 100644 (file)
@@ -18,7 +18,11 @@ void cls_version_inc(librados::ObjectWriteOperation& op, obj_version& ver, Versi
 
 void cls_version_read(librados::ObjectReadOperation& op, obj_version *objv);
 
+// these overloads which call io_ctx.operate() or io_ctx.exec() should not be called in the rgw.
+// rgw_rados_operate() should be called after the overloads w/o calls to io_ctx.operate()/exec()
+#ifndef CLS_CLIENT_HIDE_IOCTX
 int cls_version_read(librados::IoCtx& io_ctx, string& oid, obj_version *ver);
+#endif
 
 void cls_version_check(librados::ObjectOperation& op, obj_version& ver, VersionCond cond);