]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/diff_iterator: use proper snap to query parent overlap 12396/head
authorXiaoxi Chen <xiaoxchen@ebay.com>
Thu, 8 Dec 2016 18:40:03 +0000 (02:40 +0800)
committerXiaoxi Chen <xiaoxchen@ebay.com>
Tue, 13 Dec 2016 02:53:37 +0000 (10:53 +0800)
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 <xiaoxchen@ebay.com>
src/librbd/DiffIterate.cc

index c0165c72774a77a94dbbdb26db920d5268da42aa..82dcaa689ef7518c4c6a702a5d2ccadb72f2c434 100644 (file)
@@ -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;