From a88ceff2767761483aee73590767c412116a7489 Mon Sep 17 00:00:00 2001 From: Xiaoxi Chen Date: Fri, 9 Dec 2016 02:40:03 +0800 Subject: [PATCH] librbd/diff_iterator: use proper snap to query parent overlap If no snapshot has been made, we will use CEPH_NOSNAP instead of 0, to query the parent overlap. Fixes bug http://tracker.ceph.com/issues/18200 Signed-off-by: Xiaoxi Chen --- src/librbd/DiffIterate.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librbd/DiffIterate.cc b/src/librbd/DiffIterate.cc index c0165c72774..82dcaa689ef 100644 --- a/src/librbd/DiffIterate.cc +++ b/src/librbd/DiffIterate.cc @@ -264,7 +264,7 @@ int DiffIterate::execute() { RWLock::RLocker l(m_image_ctx.snap_lock); RWLock::RLocker l2(m_image_ctx.parent_lock); uint64_t overlap = end_size; - m_image_ctx.get_parent_overlap(from_snap_id, &overlap); + m_image_ctx.get_parent_overlap(m_image_ctx.snap_id, &overlap); r = 0; if (m_image_ctx.parent && overlap > 0) { ldout(cct, 10) << " first getting parent diff" << dendl;