diff --git a/internal/rbd/rbd_journal.go b/internal/rbd/rbd_journal.go index 913cadf14..ed8911fa5 100644 --- a/internal/rbd/rbd_journal.go +++ b/internal/rbd/rbd_journal.go @@ -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, diff --git a/internal/rbd/rbd_util.go b/internal/rbd/rbd_util.go index ac9b05a51..9bbf19499 100644 --- a/internal/rbd/rbd_util.go +++ b/internal/rbd/rbd_util.go @@ -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 }