journal: remove snapshot specific name from group

Adjusted method names to not have any
specific things to volumesnapshot as
we want to reuse the same journal for
volumegroup as well.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2024-06-18 11:11:33 +02:00
committed by mergify[bot]
parent 95733b3a91
commit f346f3d201
3 changed files with 24 additions and 22 deletions

View File

@ -461,7 +461,7 @@ func (cs *ControllerServer) createSnapshotAndAddMapping(
}
defer j.Destroy()
// Add the snapshot to the volume group journal
err = j.AddVolumeSnapshotMapping(ctx,
err = j.AddVolumeMapping(ctx,
vgo.MetadataPool,
vgs.ReservedID,
req.GetSourceVolumeId(),
@ -640,7 +640,7 @@ func (cs *ControllerServer) deleteSnapshotsAndUndoReservation(ctx context.Contex
return err
}
// remove the entry from the omap
err = j.RemoveVolumeSnapshotMapping(
err = j.RemoveVolumeMapping(
ctx,
vgo.MetadataPool,
vgsi.ReservedID,

View File

@ -169,7 +169,7 @@ func NewVolumeGroupOptionsFromID(
vgs.RequestName = groupAttributes.RequestName
vgs.FsVolumeGroupSnapshotName = groupAttributes.GroupName
vgs.VolumeGroupSnapshotID = volumeGroupSnapshotID
vgs.VolumeSnapshotMap = groupAttributes.VolumeSnapshotMap
vgs.VolumeSnapshotMap = groupAttributes.VolumeMap
return volOptions, &vgs, nil
}
@ -208,7 +208,7 @@ func CheckVolumeGroupSnapExists(
vgs.RequestName = volOptions.RequestName
vgs.ReservedID = volGroupData.GroupUUID
vgs.FsVolumeGroupSnapshotName = volGroupData.GroupName
vgs.VolumeSnapshotMap = volGroupData.VolumeGroupAttributes.VolumeSnapshotMap
vgs.VolumeSnapshotMap = volGroupData.VolumeGroupAttributes.VolumeMap
// found a snapshot already available, process and return it!
vgs.VolumeGroupSnapshotID, err = util.GenerateVolID(ctx, volOptions.Monitors, cr, volOptions.FscID,