From fb2caa0141f4dfc387f024f8709794112b1a3ee0 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Mon, 2 Mar 2015 21:05:52 -0500 Subject: [PATCH] librbd: add log message for completion of AioRequest The log message will simplify future debugging activities. Signed-off-by: Jason Dillaman --- src/librbd/AioRequest.cc | 12 ++++++++++++ src/librbd/AioRequest.h | 10 +--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/librbd/AioRequest.cc b/src/librbd/AioRequest.cc index dff7709984bd0..5b18bdf76261b 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 6da04b802fb4d..7c16ca50ed279 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; -- 2.39.5