From: Ilya Dryomov Date: Mon, 18 Feb 2019 10:37:09 +0000 (+0100) Subject: librbd: don't clone IoCtx in send_copyup() X-Git-Tag: v14.1.0~34^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2be8fd01408de8286ef42a09a2560b89f6e45df8;p=ceph.git librbd: don't clone IoCtx in send_copyup() Calling aio_operate() with the explicit snap_seq and snaps doesn't mutate IoCtx, so no reason to clone it. Signed-off-by: Ilya Dryomov --- diff --git a/src/librbd/io/CopyupRequest.cc b/src/librbd/io/CopyupRequest.cc index 7e34112c7414d..dddaa369fc8c1 100644 --- a/src/librbd/io/CopyupRequest.cc +++ b/src/librbd/io/CopyupRequest.cc @@ -145,12 +145,10 @@ bool CopyupRequest::send_copyup() { // this is a CoW request, a second request will be created for the // actual modification. m_pending_copyups++; - ldout(m_ictx->cct, 20) << "copyup with empty snapshot context" << dendl; - librados::AioCompletion *comp = util::create_rados_callback(this); - m_data_ctx.dup(m_ictx->data_ctx); - r = m_data_ctx.aio_operate( + librados::AioCompletion *comp = util::create_rados_callback(this); + r = m_ictx->data_ctx.aio_operate( m_oid, comp, ©up_op, 0, snaps, (m_trace.valid() ? m_trace.get_info() : nullptr)); ceph_assert(r == 0); diff --git a/src/librbd/io/CopyupRequest.h b/src/librbd/io/CopyupRequest.h index de79308562260..fba71202372de 100644 --- a/src/librbd/io/CopyupRequest.h +++ b/src/librbd/io/CopyupRequest.h @@ -100,7 +100,6 @@ private: AsyncOperation m_async_op; std::vector m_snap_ids; - librados::IoCtx m_data_ctx; // for empty SnapContext Mutex m_lock;