diff --git a/internal/uvm/scsi/manager_test.go b/internal/uvm/scsi/manager_test.go index 8c52d51b24..a854690af7 100644 --- a/internal/uvm/scsi/manager_test.go +++ b/internal/uvm/scsi/manager_test.go @@ -191,11 +191,11 @@ func TestGuestPath(t *testing.T) { if err != nil { t.Fatal(err) } - // m3 should get the guest path it asked for. - if m3.GuestPath() != "/mnt2" { + // m3 asked for a guest path, but it is already mounted, so it should get that one instead. + if m3.GuestPath() != "/mnt1" { t.Errorf("wrong guest path for m3: %s", m2.GuestPath()) } - if !reflect.DeepEqual(gb.mountPaths(), []string{"/mnt1", "/mnt2"}) { + if !reflect.DeepEqual(gb.mountPaths(), []string{"/mnt1"}) { t.Errorf("wrong mount paths after adding m3: %v", gb.mountPaths()) } diff --git a/internal/uvm/scsi/mount.go b/internal/uvm/scsi/mount.go index 1f2fb831cc..68e36f1c9c 100644 --- a/internal/uvm/scsi/mount.go +++ b/internal/uvm/scsi/mount.go @@ -123,7 +123,6 @@ func (mm *mountManager) trackMount(controller, lun uint, path string, c *mountCo } } else if controller == mount.controller && lun == mount.lun && - (path == "" || path == mount.path) && reflect.DeepEqual(c, mount.config) { mount.refCount++