Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add volume event handling to virtio scsi driver #1628

Merged
merged 2 commits into from
Nov 18, 2021

Conversation

sanderssj
Copy link
Collaborator

Virtio scsi uses the event queue to pass asynchronous information about
volumes added or removed. This change implements handling of these events.
Virtio scsi disks for a scsi device are now stored in a vector for lookup
by the event handler. The rescan event sends an inquiry to the lun specified
in the event, unless than lun is zero, which triggers a report luns for
the target, as indicated by the specification. LUNs that are detected in this
rescan are not re-added if they already exist in the disk list.

I had implemented handling of unit attention sense codes but I could not trigger
them on GCP, so I left it out of this PR as I was unable to test it and that handling
is more complicated.

@sanderssj sanderssj requested a review from a team November 13, 2021 22:09
@sanderssj sanderssj force-pushed the feature/virtio_scsi-volume-events branch 2 times, most recently from 606f3d9 to 933aa6f Compare November 17, 2021 03:26
Virtio scsi uses the event queue to pass asynchronous information about
volumes added or removed. This change implements handling of these events.
Virtio scsi disks for a scsi device are now stored in a vector for lookup
by the event handler. The rescan event sends an inquiry to the lun specified
in the event, unless than lun is zero, which triggers a report luns for
the target, as indicated by the specification. LUNs that are detected in this
rescan are not re-added if they already exist in the disk list.
Copy link
Contributor

@wjhun wjhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants