mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
rbd: remove unneeded updateVolWithImageInfo()
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
824f38daaa
commit
3364fe7b78
@ -214,7 +214,7 @@ func (rv *rbdVolume) Exists(ctx context.Context) (bool, error) {
|
||||
// save it for size checks before fetching image data
|
||||
requestSize := rv.VolSize
|
||||
// Fetch on-disk image attributes and compare against request
|
||||
err = updateVolWithImageInfo(ctx, rv, rv.conn.Creds)
|
||||
err = rv.getImageInfo()
|
||||
if err != nil {
|
||||
if _, ok := err.(ErrImageNotFound); ok {
|
||||
err = j.UndoReservation(ctx, rv.JournalPool, rv.Pool,
|
||||
|
@ -377,12 +377,6 @@ func updateSnapWithImageInfo(ctx context.Context, rbdSnap *rbdSnapshot, cr *util
|
||||
return err
|
||||
}
|
||||
|
||||
// updateVolWithImageInfo updates provided rbdVolume with information from on-disk data
|
||||
// regarding the same
|
||||
func updateVolWithImageInfo(ctx context.Context, rbdVol *rbdVolume, cr *util.Credentials) error {
|
||||
return rbdVol.getImageInfo()
|
||||
}
|
||||
|
||||
// genSnapFromSnapID generates a rbdSnapshot structure from the provided identifier, updating
|
||||
// the structure with elements from on-disk snapshot metadata as well
|
||||
func genSnapFromSnapID(ctx context.Context, rbdSnap *rbdSnapshot, snapshotID string, cr *util.Credentials) error {
|
||||
@ -513,7 +507,7 @@ func genVolFromVolID(ctx context.Context, volumeID string, cr *util.Credentials,
|
||||
}
|
||||
}
|
||||
|
||||
err = updateVolWithImageInfo(ctx, rbdVol, cr)
|
||||
err = rbdVol.getImageInfo()
|
||||
|
||||
return rbdVol, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user