mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
rbd: remove SizeBytes from rbdSnapshot struct
as we are moving the VolSize to rbdImage struct we should reuse the same instead of maintaining one more field in rbdSnapshot struct. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
b1a0bb4714
commit
6a82baf5d3
@ -1001,7 +1001,7 @@ func (cs *ControllerServer) CreateSnapshot(
|
|||||||
return nil, status.Error(codes.Internal, err.Error())
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
}
|
}
|
||||||
rbdSnap.RbdImageName = rbdVol.RbdImageName
|
rbdSnap.RbdImageName = rbdVol.RbdImageName
|
||||||
rbdSnap.SizeBytes = rbdVol.VolSize
|
rbdSnap.VolSize = rbdVol.VolSize
|
||||||
rbdSnap.SourceVolumeID = req.GetSourceVolumeId()
|
rbdSnap.SourceVolumeID = req.GetSourceVolumeId()
|
||||||
rbdSnap.RequestName = req.GetName()
|
rbdSnap.RequestName = req.GetName()
|
||||||
|
|
||||||
@ -1134,7 +1134,7 @@ func cloneFromSnapshot(
|
|||||||
|
|
||||||
return &csi.CreateSnapshotResponse{
|
return &csi.CreateSnapshotResponse{
|
||||||
Snapshot: &csi.Snapshot{
|
Snapshot: &csi.Snapshot{
|
||||||
SizeBytes: rbdSnap.SizeBytes,
|
SizeBytes: rbdSnap.VolSize,
|
||||||
SnapshotId: rbdSnap.VolID,
|
SnapshotId: rbdSnap.VolID,
|
||||||
SourceVolumeId: rbdSnap.SourceVolumeID,
|
SourceVolumeId: rbdSnap.SourceVolumeID,
|
||||||
CreationTime: rbdSnap.CreatedAt,
|
CreationTime: rbdSnap.CreatedAt,
|
||||||
|
@ -176,7 +176,7 @@ func checkSnapCloneExists(
|
|||||||
// Code from here on, rolls the transaction forward.
|
// Code from here on, rolls the transaction forward.
|
||||||
|
|
||||||
rbdSnap.CreatedAt = vol.CreatedAt
|
rbdSnap.CreatedAt = vol.CreatedAt
|
||||||
rbdSnap.SizeBytes = vol.VolSize
|
rbdSnap.VolSize = vol.VolSize
|
||||||
// found a snapshot already available, process and return its information
|
// found a snapshot already available, process and return its information
|
||||||
rbdSnap.VolID, err = util.GenerateVolID(ctx, rbdSnap.Monitors, cr, snapData.ImagePoolID, rbdSnap.Pool,
|
rbdSnap.VolID, err = util.GenerateVolID(ctx, rbdSnap.Monitors, cr, snapData.ImagePoolID, rbdSnap.Pool,
|
||||||
rbdSnap.ClusterID, snapUUID, volIDVersion)
|
rbdSnap.ClusterID, snapUUID, volIDVersion)
|
||||||
|
@ -184,7 +184,6 @@ type rbdSnapshot struct {
|
|||||||
SourceVolumeID string
|
SourceVolumeID string
|
||||||
ReservedID string
|
ReservedID string
|
||||||
RbdSnapName string
|
RbdSnapName string
|
||||||
SizeBytes int64
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// imageFeature represents required image features and value.
|
// imageFeature represents required image features and value.
|
||||||
|
Loading…
Reference in New Issue
Block a user