]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: add get_version64()
authorSage Weil <sage@inktank.com>
Wed, 28 Aug 2013 22:41:31 +0000 (15:41 -0700)
committerSage Weil <sage@inktank.com>
Thu, 29 Aug 2013 00:05:00 +0000 (17:05 -0700)
The C++ AioCompletion::get_version() method only returns 32-bits.  Sigh.

Add a get_version64() method that returns all 64-bits. Do not touch the
32-bit version to avoid breaking the ABI.

Backport: dumpling, cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
PendingReleaseNotes
src/include/rados/librados.hpp
src/librados/librados.cc

index ccbe0596b70bcaa7880621d96f6f890d57ac7926..6609acbd5a8256e3e217b7ca68b4339deffccbfe 100644 (file)
@@ -17,4 +17,12 @@ v0.68
   is probably how it should have been acting from the beginning. Users are
   unlikely to notice but it could result in lower performance in some
   circumstances. Those who care should switch to using the async interfaces,
-  which let you specify safety semantics precisely.
\ No newline at end of file
+  which let you specify safety semantics precisely.
+
+* The C++ librados AioComplete::get_version() method was incorrectly
+  returning an int (usually 32-bits).  To avoid breaking library
+  compatibility, a get_version64() method is added that returns the
+  full-width value.  The old method is deprecated and will be removed
+  in a future release.  Users of the C++ librados API that make use of
+  the get_version() method should modify their code to avoid getting a
+  value that is truncated from 64 to to 32 bits.
\ No newline at end of file
index cf193b36d7271bbfe385d6ec209dcd1242d2988c..bc0bcc95ceb54ffde9e55c95add8904f6d24fb51 100644 (file)
@@ -96,7 +96,8 @@ namespace librados
     bool is_complete_and_cb();
     bool is_safe_and_cb();
     int get_return_value();
-    int get_version();
+    int get_version();  ///< DEPRECATED get_version() only returns 32-bits
+    uint64_t get_version64();
     void release();
     AioCompletionImpl *pc;
   };
index f704412559fb715ecc2e5755748e1ae4df3440cb..12372d960b1b02d2ab28dd658995807fd1cc0d76 100644 (file)
@@ -592,6 +592,12 @@ int librados::AioCompletion::AioCompletion::get_version()
   return c->get_version();
 }
 
+uint64_t librados::AioCompletion::AioCompletion::get_version64()
+{
+  AioCompletionImpl *c = (AioCompletionImpl *)pc;
+  return c->get_version();
+}
+
 void librados::AioCompletion::AioCompletion::release()
 {
   AioCompletionImpl *c = (AioCompletionImpl *)pc;