Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

scsi: relax mount re-use constraint #2280

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/uvm/scsi/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand Down
1 change: 0 additions & 1 deletion internal/uvm/scsi/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand Down