mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
rbd: remove unused rbdVolume.open()
rbdVolume.open() was split from commit 5dd34732e1e while moving part of the functionality to util.ClusterConnection. It seems that .open() is not used anywhere at the moment, so drop it until follow-up patches require it again. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
01edaf8a71
commit
805f10fd71
@ -197,30 +197,6 @@ func createImage(ctx context.Context, pOpts *rbdVolume, cr *util.Credentials) er
|
||||
return nil
|
||||
}
|
||||
|
||||
// Open the rbdVolume after it has been connected.
|
||||
func (rv *rbdVolume) open() (*librbd.Image, error) {
|
||||
if rv.RbdImageName == "" {
|
||||
var vi util.CSIIdentifier
|
||||
err := vi.DecomposeCSIID(rv.VolID)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error decoding volume ID (%s) (%s)", rv.VolID, err)
|
||||
return nil, ErrInvalidVolID{err}
|
||||
}
|
||||
rv.RbdImageName = volJournal.GetNameForUUID(rv.NamePrefix, vi.ObjectUUID, false)
|
||||
}
|
||||
|
||||
ioctx, err := rv.conn.GetIoctx(rv.Pool)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
image, err := librbd.OpenImage(ioctx, rv.RbdImageName, librbd.NoSnapshot)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return image, nil
|
||||
}
|
||||
|
||||
// rbdStatus checks if there is watcher on the image.
|
||||
// It returns true if there is a watcher on the image, otherwise returns false.
|
||||
func rbdStatus(ctx context.Context, pOpts *rbdVolume, cr *util.Credentials) (bool, string, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user