]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/mirror: set valid group_spec in MirrorSnapshotNamespace
authorRamana Raja <rraja@redhat.com>
Tue, 4 Mar 2025 23:01:18 +0000 (18:01 -0500)
committerPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Thu, 24 Apr 2025 15:56:32 +0000 (21:26 +0530)
... for a member image snap of a non-primary mirror group.

Previously, group_spec's group_id was always an empty string, and its
pool_id was set to be the image's metadata pool ID.

Signed-off-by: Ramana Raja <rraja@redhat.com>
src/librbd/mirror/snapshot/CreateNonPrimaryRequest.cc

index 9fcb80ef7dc877d08e04b5700cde3421a2769fa9..e774f6f82bc48d0d03b25e69c8966c991a8ce036 100644 (file)
@@ -200,7 +200,7 @@ void CreateNonPrimaryRequest<I>::create_snapshot() {
     ns.mirror_peer_uuids = m_mirror_peer_uuids;
   }
   if (!m_group_snap_id.empty()) {
-    ns.group_spec = {m_group_id, m_image_ctx->md_ctx.get_id()};
+    ns.group_spec = m_image_ctx->group_spec;
     ns.group_snap_id = m_group_snap_id;
   }
   ns.snap_seqs = m_snap_seqs;