From: Jason Dillaman Date: Tue, 3 Mar 2015 02:05:52 +0000 (-0500) Subject: librbd: add log message for completion of AioRequest X-Git-Tag: v0.94~65^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fb2caa0141f4dfc387f024f8709794112b1a3ee0;p=ceph.git librbd: add log message for completion of AioRequest The log message will simplify future debugging activities. Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/AioRequest.cc b/src/librbd/AioRequest.cc index dff7709984bd..5b18bdf76261 100644 --- a/src/librbd/AioRequest.cc +++ b/src/librbd/AioRequest.cc @@ -48,6 +48,18 @@ namespace librbd { } } + void AioRequest::complete(int r) + { + if (should_complete(r)) { + ldout(m_ictx->cct, 20) << "complete " << this << dendl; + if (m_hide_enoent && r == -ENOENT) { + r = 0; + } + m_completion->complete(r); + delete this; + } + } + void AioRequest::read_from_parent(vector >& image_extents) { assert(!m_parent_completion); diff --git a/src/librbd/AioRequest.h b/src/librbd/AioRequest.h index 6da04b802fb4..7c16ca50ed27 100644 --- a/src/librbd/AioRequest.h +++ b/src/librbd/AioRequest.h @@ -34,15 +34,7 @@ namespace librbd { Context *completion, bool hide_enoent); virtual ~AioRequest(); - void complete(int r) - { - if (should_complete(r)) { - if (m_hide_enoent && r == -ENOENT) - r = 0; - m_completion->complete(r); - delete this; - } - } + void complete(int r); virtual bool should_complete(int r) = 0; virtual int send() = 0;