]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: add constructor to allow client re-use
authorJosh Durgin <josh.durgin@dreamhost.com>
Wed, 23 Feb 2011 22:07:46 +0000 (14:07 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Wed, 23 Feb 2011 17:31:52 +0000 (09:31 -0800)
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/include/rados/librados.hpp
src/librados.cc

index 6d2b9840e03bc48e906596dc9ab0a0f900f2edc1..23f3d18d336f9f2d6e7f5d6eec041caf742e5e90 100644 (file)
@@ -54,6 +54,7 @@ class Rados
   RadosClient *client;
 public:
   Rados();
+  Rados(pool_t pool);
   ~Rados();
 
   /* We don't allow assignment or copying */
index 2a8dbb8f94ee74be77f9ecac35f2c482fa6af6ca..eaa5eaa9128b4e438084c7c4f89d1e99cf670ce7 100644 (file)
@@ -1803,6 +1803,12 @@ Rados::Rados() : client(NULL)
 {
 }
 
+Rados::Rados(pool_t pool)
+{
+  RadosClient::PoolCtx *ctx = (RadosClient::PoolCtx *)pool;
+  client = ctx->client;
+}
+
 Rados::~Rados()
 {
   if (client)