-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The existing SCSI implementation in internal/uvm has evolved organically over time into what it is today. This creates unecessary difficulty when adding new features to the code, makes it harder to maintain, and has been a source of bugs. Additionally, there is a significant functional issue that the current scsi code tightly couples the idea of attaching a SCSI device to a VM, with the use/mounting of that device inside the VM. This creates difficulty when we want to re-use the same SCSI attachment multiple times, especially in the future when we will need to mount multiple partitions from a device. This is addressed here by largely rewriting the shim's SCSI code, and moving it to a new internal/uvm/scsi package. The new code features a main Manager type, which delegates to attachManager and mountManager for tracking of attachments to the VM, and mounting of devices inside the VM, respectively. attachManager and mountManager also rely on a set of interfaces for the actual backend implementation of interacting with a VM. This will also allow for easier testing of the scsi package in isolation in the future. One consequence of this change is it is no longer possible for the caller to request a specific UVM path for a SCSI mount. The support for this was already kind of a sham, because if the disk was already mounted, you would get back its existing mount path instead of the one you wanted, so the caller already had to handle that case. Additionally, I'm not aware of any reason why the specific location the disk is mounted is actually relevant. Because of these reasons, and to simplify the overall package interface, the mount path is determined by the scsi package, using a format string passed to the Manager at creation time. Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
- Loading branch information
Showing
26 changed files
with
1,221 additions
and
749 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.