Page MenuHomeFreeBSD

hyperv/stor: handle the host's response's status properly
ClosedPublic

Authored by decui_microsoft.com on Jul 11 2016, 11:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 12:32 PM
Unknown Object (File)
Fri, Nov 15, 3:11 PM
Unknown Object (File)
Mon, Nov 11, 2:58 PM
Unknown Object (File)
Oct 22 2024, 10:20 AM
Unknown Object (File)
Oct 22 2024, 10:20 AM
Unknown Object (File)
Oct 22 2024, 10:20 AM
Unknown Object (File)
Oct 22 2024, 10:10 AM
Unknown Object (File)
Oct 18 2024, 4:16 AM
Subscribers

Details

Summary

Hyper-V has a feature called Online VHDX Resize: the disk capacity can be
changed by the host when the VM is running. Note: the host doesn't notify
the VM of the capacity change proactively; when the VM sends the next I/O
request to the host, the host will report an error (SCSI_STATUS_CHECK_COND)
with sense data supplied (the sense data indicates a disk capacity change)
and the VM is supposed to check and handle the capacity change properly,
and retry the I/O request.

However, the current I/O response handling in the VM has a bug: the host's
response's status is lost unintentionally, so the upper SCSI layer in the VM
always thinks the I/O request is completed successfully while it's not (this
causes undefined behaviors), and ignores the sense data.

The patch fixes the issue and makes Online VHDX Resize work properly.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4476
Build 4527: arc lint + arc unit

Event Timeline

decui_microsoft.com retitled this revision from to hyperv/stor: handle the host's response's status properly.
decui_microsoft.com updated this object.
decui_microsoft.com edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Jul 12 2016, 1:40 AM
This revision was automatically updated to reflect the committed changes.