]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: mark old watch calls deprecated
authorSage Weil <sage@redhat.com>
Thu, 13 Nov 2014 21:53:23 +0000 (13:53 -0800)
committerSage Weil <sage@redhat.com>
Thu, 4 Dec 2014 18:33:12 +0000 (10:33 -0800)
Signed-off-by: Sage Weil <sage@redhat.com>
src/include/rados/librados.h
src/include/rados/librados.hpp
src/test/librados/watch_notify.cc
src/test/multi_stress_watch.cc
src/test/system/st_rados_notify.cc
src/test/system/st_rados_watch.cc
src/test/test_stress_watch.cc

index f2b5771599f5e3215f003cd3e73f75307fe0cc2c..fbb02c8129ee8a0e9c5baac2008822ab197a937e 100644 (file)
@@ -1949,8 +1949,9 @@ typedef void (*rados_watchfailcb_t)(void *arg,
  * @returns -ERANGE if the version of the object is greater than ver
  */
 CEPH_RADOS_API int rados_watch(rados_ioctx_t io, const char *o, uint64_t ver,
-                               uint64_t *handle, rados_watchcb_t watchcb,
-                               void *arg);
+                              uint64_t *handle,
+                              rados_watchcb_t watchcb, void *arg)
+  __attribute__((deprecated));
 
 
 /**
@@ -2012,7 +2013,8 @@ CEPH_RADOS_API int rados_unwatch(rados_ioctx_t io, const char *o,
  * @returns 0 on success, negative error code on failure
  */
 CEPH_RADOS_API int rados_notify(rados_ioctx_t io, const char *o, uint64_t ver,
-                                const char *buf, int buf_len);
+                               const char *buf, int buf_len)
+  __attribute__((deprecated));
 
 /**
  * Sychronously notify watchers of an object
index 74883cec4ba0943eccc8c7c779476248a0012c3f..99b9a95568f9b01b011eefd396b1aebb714eea58 100644 (file)
@@ -937,12 +937,9 @@ namespace librados
                    bufferlist *pbl);
 
     // watch/notify
-    int watch(const std::string& o, uint64_t ver, uint64_t *handle,
-             librados::WatchCtx *ctx) __attribute__ ((deprecated));
     int watch2(const std::string& o, uint64_t *handle,
               librados::WatchCtx2 *ctx);
     int unwatch(const std::string& o, uint64_t handle);
-    int notify(const std::string& o, uint64_t ver, bufferlist& bl) __attribute__ ((deprecated));
     int notify2(const std::string& o,   ///< object
                bufferlist& bl,         ///< optional broadcast payload
                uint64_t timeout_ms,    ///< timeout (in ms)
@@ -957,6 +954,12 @@ namespace librados
                    uint64_t handle,      ///< our watch handle
                    bufferlist& bl);      ///< optional reply payload
 
+    // old, deprecated versions
+    int watch(const std::string& o, uint64_t ver, uint64_t *handle,
+             librados::WatchCtx *ctx) __attribute__ ((deprecated));
+    int notify(const std::string& o, uint64_t ver, bufferlist& bl)
+      __attribute__ ((deprecated));
+
     /**
      * Set allocation hint for an object
      *
index 8c436d050e15e3141f98580788defe55aa51754f..deaaf9a4711088e6200b7f54d5eb84c67e80e727 100644 (file)
@@ -111,6 +111,9 @@ public:
 
 // --
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 TEST_F(LibRadosWatchNotify, WatchNotify) {
   ASSERT_EQ(0, sem_init(&sem, 0, 0));
   char buf[128];
@@ -219,6 +222,8 @@ TEST_F(LibRadosWatchNotifyECPP, WatchNotifyTimeout) {
   ASSERT_EQ(0, ioctx.unwatch("foo", handle));
 }
 
+#pragma GCC diagnostic pop
+
 
 // --
 
index 6203d7b129812c02b6a83424061f980d5d996146..aa02d6941dbb2cb67efe29c110ecea2512630f1f 100644 (file)
@@ -29,6 +29,9 @@ public:
     }
 };
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 void
 test_loop(Rados &cluster, std::string pool_name, std::string obj_name)
 {
@@ -63,6 +66,8 @@ test_loop(Rados &cluster, std::string pool_name, std::string obj_name)
   ioctx.close();
 }
 
+#pragma GCC diagnostic pop
+
 void
 test_replicated(Rados &cluster, std::string pool_name, std::string obj_name)
 {
index e74711cb6410c6631f6e39e51a14c547f721a22a..b5fea3ecab27adaef5f1e26c1d19fad51d760090 100644 (file)
@@ -38,6 +38,9 @@ StRadosNotify::~StRadosNotify()
 {
 }
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 int StRadosNotify::run()
 {
   rados_t cl;
@@ -72,3 +75,5 @@ int StRadosNotify::run()
 
   return 0;
 }
+
+#pragma GCC diagnostic pop
index 38b7b5eee85a61ebff2fea43750f1382ec9f3a79..ba58e474ade1451a17327fd26df88b8d69ccb078 100644 (file)
@@ -47,6 +47,9 @@ StRadosWatch::
 {
 }
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 int StRadosWatch::
 run()
 {
@@ -94,3 +97,5 @@ run()
 
   return r;
 }
+
+#pragma GCC diagnostic pop
index 52b480b4576c260bfe5f8c304b4035c9f8e76254..c9813e698f54a1015218de776fb1d6e0fc8345cc 100644 (file)
@@ -35,6 +35,9 @@ public:
     }
 };
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
 struct WatcherUnwatcher : public Thread {
   string pool;
   WatcherUnwatcher(string& _pool) : pool(_pool) {}
@@ -116,3 +119,5 @@ TEST_P(WatchStress, Stress1) {
   ASSERT_EQ(0, destroy_one_pool_pp(pool_name, ncluster));
   sem_destroy(&sem);
 }
+
+#pragma GCC diagnostic pop