summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-08-28 15:41:31 -0700
committerSage Weil <sage@inktank.com>2013-08-28 17:05:00 -0700
commit985a1405db6364d4283b68c681d6a4e816decf7e (patch)
tree40bc2f6659a7f8cc1f37498c6c7b7411c802ba31
parent3e63c1a4af6c956458cf2044ac45d2bb5833dbd2 (diff)
downloadceph-985a1405db6364d4283b68c681d6a4e816decf7e.tar.gz
librados: add get_version64()
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>
-rw-r--r--PendingReleaseNotes10
-rw-r--r--src/include/rados/librados.hpp3
-rw-r--r--src/librados/librados.cc6
3 files changed, 17 insertions, 2 deletions
diff --git a/PendingReleaseNotes b/PendingReleaseNotes
index ccbe0596b70..6609acbd5a8 100644
--- a/PendingReleaseNotes
+++ b/PendingReleaseNotes
@@ -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
diff --git a/src/include/rados/librados.hpp b/src/include/rados/librados.hpp
index cf193b36d72..bc0bcc95ceb 100644
--- a/src/include/rados/librados.hpp
+++ b/src/include/rados/librados.hpp
@@ -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;
};
diff --git a/src/librados/librados.cc b/src/librados/librados.cc
index f704412559f..12372d960b1 100644
--- a/src/librados/librados.cc
+++ b/src/librados/librados.cc
@@ -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;