]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: Expose RadosClient instance id through librados
authorJason Dillaman <dillaman@redhat.com>
Sun, 28 Sep 2014 07:46:04 +0000 (03:46 -0400)
committerJosh Durgin <jdurgin@redhat.com>
Sat, 24 Jan 2015 23:03:44 +0000 (15:03 -0800)
Allow librados clients to utilize the global id of the RadosClient.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/include/rados/librados.hpp
src/librados/librados.cc

index 7be99680207a39672ae73d09f2efb52c44772422..ec6428bf12c6dae305552aad29f4966a02c0775f 100644 (file)
@@ -620,6 +620,8 @@ namespace librados
     // get pool auid
     int get_auid(uint64_t *auid_);
 
+    uint64_t get_instance_id() const;
+
     std::string get_pool_name();
 
     bool pool_requires_alignment();
index dfbedaa0eb9f7dea865660780f2208ea6be2777c..3a3a7a0d13ec47a0f5fc8ccc97dccd4ae3a9eaf8 100644 (file)
@@ -1037,6 +1037,11 @@ std::string librados::IoCtx::get_pool_name()
   return s;
 }
 
+uint64_t librados::IoCtx::get_instance_id() const
+{
+  return io_ctx_impl->client->get_instance_id();
+}
+
 int librados::IoCtx::create(const std::string& oid, bool exclusive)
 {
   object_t obj(oid);