]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: get_parent_info: don't try to find parent snap name for CEPH_NOSNAP
authorMykola Golub <mgolub@suse.com>
Fri, 16 Feb 2018 13:45:50 +0000 (15:45 +0200)
committerJason Dillaman <dillaman@redhat.com>
Tue, 14 Aug 2018 22:29:45 +0000 (18:29 -0400)
(it is possible now when the parent is a migration source)

Signed-off-by: Mykola Golub <mgolub@suse.com>
src/librbd/internal.cc

index 1433ce54fa70fd77177901e38bda29f427dde81f..8cca5a0c5a3344710dff3b67b240c0ed281921c3 100644 (file)
@@ -1122,7 +1122,7 @@ bool compare_by_name(const child_info_t& c1, const child_info_t& c2)
       }
     }
 
-    if (parent_snap_name) {
+    if (parent_snap_name && parent_spec.snap_id != CEPH_NOSNAP) {
       RWLock::RLocker l(ictx->parent->snap_lock);
       r = ictx->parent->get_snap_name(parent_spec.snap_id,
                                      parent_snap_name);