Project

General

Profile

Bug #15535

Missing export for rados_aio_get_version in src/include/rados/librados.h

Added by Jim Wright almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
librados
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Hi,

The function rados_aio_get_version is correctly defined and implemented in src/librados/librados.cc. However without a corresponding declaration in librados.h specifying it has scope CEPH_RADOS_API, the function ends up having no external visibility in librados.so; and so is uncallable by library users.


Related issues

Copied to Ceph - Backport #16153: jewel: Missing export for rados_aio_get_version in src/include/rados/librados.h Resolved

Associated revisions

Revision a5a1c173 (diff)
Added by Jim Wright almost 8 years ago

librados: Added declaration for rados_aio_get_version

Was missing from librados.h and hence had an incorrect
visability.

Fixes: #15535

Revision 1c7abcbf (diff)
Added by Jim Wright almost 8 years ago

librados: Added declaration for rados_aio_get_version

Was missing from librados.h and hence had an incorrect
visability.

Fixes: #15535
(cherry picked from commit a5a1c1732e50be7d27f8742e794eba88d35c1c7f)

History

#1 Updated by Jim Wright almost 8 years ago

This diff fixes the issue, however I'm unsure if the doxygen comments are correct as I just copied them from rados_aio_get_return_value.

diff --git a/src/include/rados/librados.h b/src/include/rados/librados.h
index 3aebf20..9048ad7 100644
--- a/src/include/rados/librados.h
+++ b/src/include/rados/librados.h
@@ -1706,6 +1706,22 @@ CEPH_RADOS_API int rados_aio_is_safe_and_cb(rados_completion_t c);
 CEPH_RADOS_API int rados_aio_get_return_value(rados_completion_t c);

 /**
+ * Get the version of an asychronous operation's object
+ *
+ * The return value is set when the operation is complete or safe,
+ * whichever comes first.
+ *
+ * @pre The operation is safe or complete
+ *
+ * @note BUG: complete callback may never be called when the safe
+ * message is received before the complete message
+ *
+ * @param c async operation to inspect
+ * @returns version number of the operation's object
+ */
+CEPH_RADOS_API uint64_t rados_aio_get_version(rados_completion_t c);
+
+/**
  * Release a completion
  *
  * Call this when you no longer need the completion. It may not be

#2 Updated by Sage Weil almost 8 years ago

  • Status changed from New to Pending Backport
  • Backport set to jewel

#4 Updated by Nathan Cutler almost 8 years ago

  • Copied to Backport #16153: jewel: Missing export for rados_aio_get_version in src/include/rados/librados.h added

#5 Updated by Loïc Dachary almost 8 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF