]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librados: fix IoCtx::from_rados_ioctx_t
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Tue, 1 Mar 2011 12:15:58 +0000 (04:15 -0800)
committerJosh Durgin <josh.durgin@dreamhost.com>
Fri, 4 Mar 2011 00:04:06 +0000 (16:04 -0800)
commit0e32cd2f55ff8f941db02a11ef083beed7c02077
treea416ad204030cb21ad7a288a8db07ac4d4fbe56f
parentecab94cac3038a014c28b9ccc3a4a6404881beb2
librados: fix IoCtx::from_rados_ioctx_t

IoCtx::from_rados_ioctx_t creates an IoCtx out of a rados_ioctx_t.
However, this IoCtx must share ownership of the IoCtxImpl pointer with
the C API user who first called rados_ioctx_create. This must be done
via a reference count inside the IoCtxImpl.

Also add a copy constructor and assignment operator to class IoCtx,
since it's now cheap to have them.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/include/rados/librados.hpp
src/librados.cc