332903 |
24-Apr-2018 |
dexuan |
MFC: 332385
r332385: hyperv/storvsc: storvsc_io_done(): do not use CAM_SEL_TIMEOUT
CAM_SEL_TIMEOUT was introduced in https://reviews.freebsd.org/D7521 (r304251), which claimed:
"VM shall response to CAM layer with CAM_SEL_TIMEOUT to filter those invalid LUNs. Never use CAM_DEV_NOT_THERE which will block LUN scan for LUN number higher than 7."
But it turns out this is not correct:
I think what really filters the invalid LUNs in r304251 is that: before r304251, we could set the CAM_REQ_CMP without checking vm_srb->srb_status at all: ccb->ccb_h.status |= CAM_REQ_CMP.
r304251 checks vm_srb->srb_status and sets ccb->ccb_h.status properly, so the invalid LUNs are filtered.
I changed my code version to r304251 but replaced the CAM_SEL_TIMEOUT with CAM_DEV_NOT_THERE, and I confirmed the invalid LUNs can also be filtered, and I successfully hot-added and hot-removed 8 disks to/from the VM without any issue.
CAM_SEL_TIMEOUT has an unwanted side effect -- see cam_periph_error(): For a selection timeout, we consider all of the LUNs on the target to be gone. If the status is CAM_DEV_NOT_THERE, then we only get rid of the device(s) specified by the path in the original CCB.
This means: for a VM with a valid LUN on 3:0:0:0, when the VM inquires 3:0:0:1 and the host reports 3:0:0:1 doesn't exist and storvsc returns CAM_SEL_TIMEOUT to the CAM layer, CAM will detech 3:0:0:0 as well: this is the bug I reported recently: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226583
PR: 226583 Reviewed by: mav Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D14690 |
320351 |
26-Jun-2017 |
sephe |
MFC 320184
hyperv/storvsc: Reduce log verbosity
On some windows hosts TEST_UNIT_READY command will return SRB_STATUS_ERROR and sense data "NOT READY asc:3a,1 (Medium not present - tray closed)", this occurs periodically, and not hurt anything else. So, we prefer to ignore this kind of errors.
Approved by: re (delphij) PR: 219973 Submitted by: Hongjiang Zhang <hongzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11271 |
311374 |
05-Jan-2017 |
sephe |
MFC 309726,309728
309726
hyperv/storvsc: Fix the SCSI disk attachment issue.
On pre-WS2016 Hyper-V, if the only LUNs > 7 are used, then all disks fails to attach. Mainly because those versions of Hyper-V do not set SRB_STATUS properly and deliver junky INQUERY responses.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Reported by: Hongxiong Xian <v-hoxian microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8724
309728 hyperv/storvsc: Minor style changes; no functional changes.
Reported by: rpokala Sponsored by: Microsoft |
307307 |
14-Oct-2016 |
sephe |
MFC 302698-302704,302706
302698 hyperv/vmbus: Add vmbus method for GUID base device probing.
Reduce the exposure of hv_device.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7024
302699 hyperv/vmbus: All ivars are read-only; nuke unnecessary write_ivar
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7025
302700 hyperv/vmbus: Add channel ivar accessor.
This makes life easier during the transition period to nuke the hv_device.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7026
302701 hyperv/stor: Avoid the hv_device and nuke the broken get_stor_device
This paves way to nuke the hv_device, which is actually an unncessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7027
302702 hyperv/util: Avoid the hv_device
This paves way to nuke the hv_device, which is actually an unncessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7028
302703 hyperv/vmbus: Deprecate the usage of hv_device.
This paves way to nuke the hv_device, which is actually an unncessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7032
302704 hyperv/hn: Avoid the hv_device
This paves way to nuke the hv_device, which is actually an unncessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7033
302706 hyperv: Get rid of hv_device, which is unnecessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7034 |
304582 |
22-Aug-2016 |
sephe |
MFC 304251
hyperv/storvsc: Deliver CAM_SEL_TIMEOUT upon SRB status error.
SRB status is set to 0x20 by the hypervisor, if the specified LUN is unaccessible, and even worse the INQUIRY response will not be set by the hypervisor at all under this situation. Additionally, SRB status is 0x20 too, for TUR on an unaccessible LUN.
Deliver CAM_SEL_TIMEOUT to CAM upon SRB status errors as suggested by Scott Long, other values seems improper.
This commit fixes the Hyper-V disk hotplug support.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7521 |
302862 |
15-Jul-2016 |
sephe |
MFC 302541,302605
302541 hyperv/stor: Fix the INQUIRY checks
Don't check the area that the host has not filled.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209443 PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210425 Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: sephe, Dexuan Cui <decui microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6955
302605 hyperv/stor: Save the response status and xfer length properly.
The current command response handling discards status and xfer length unconditionally, so that all of the commands would be considered successful, even if errors happened. When errors really happens, this causes all kinds of wiredness, since the buffer will not be filled on the host side and sense data will be ignored.
Most of the time, errors do not happen, however, error does happen for the request sent immediately after the disk resizing. Discarding the SCSI status (SCSI_STATUS_CHECK_COND) and sense data (capacity changes) prevents the disk resizing from working properly.
This commit saves the response status and xfer length properly for later use.
Submitted by: Dexuan Cui <decui microsoft com> Noticed by: sephe Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7181
Approved by: re (gjb) |
299505 |
12-May-2016 |
sephe |
hyperv/stor: Enable INQUIRY result check only on WIN10 like host systems
On WIN8 like host systems, when rescan happens, the already installed disks seem to return random invalid results for INQUIRY.
More investigation is under way to figure out why random invalid INQUIRY results are delivered to VM on WIN8 like host systems.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: sephe MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6316
|
295295 |
05-Feb-2016 |
sephe |
hyperv/stor: Fix the NULL pointer dereference
Reported by: Netapp Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: adrian, sephe, Dexuan Cui <decui microsoft com> Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5097
|
294557 |
22-Jan-2016 |
sephe |
hyperv/stor: Verify returned inquiry data before further dispatching
Windows 10 and Window 2016 will return all zero inquiry data for non-existing slots. If we dispatched them, then a lot of useless (0 sized) disks would be created. So we verify the returned inquiry data (valid type, non-empty vendor/product/revision etc.), before further dispatching.
Minor white space cleanup and wording fix.
Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: adrian, sephe, Jun Su <junsu microsoft com> Approved by: adrian (mentor) Modified by: sephe Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4928
|
283291 |
22-May-2015 |
jkim |
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent.
Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks
|
282212 |
29-Apr-2015 |
whu |
Microsoft vmbus, storage and other related driver enhancements for HyperV. - Vmbus multi channel support. - Vector interrupt support. - Signal optimization. - Storvsc driver performance improvement. - Scatter and gather support for storvsc driver. - Minor bug fix for KVP driver. Thanks royger, jhb and delphij from FreeBSD community for the reviews and comments. Also thanks Hovy Xu from NetApp for the contributions to the storvsc driver.
PR: 195238 Submitted by: whu Reviewed by: royger, jhb, delphij Approved by: royger MFC after: 2 weeks Relnotes: yes Sponsored by: Microsoft OSTC
|
274819 |
21-Nov-2014 |
smh |
Prevent overflow issues in timeout processing
Previously, any timeout value for which (timeout * hz) will overflow the signed integer, will give weird results, since callout(9) routines will convert negative values of ticks to '1'. For unsigned integer overflow we will get sufficiently smaller timeout values than expected.
Switch from callout_reset, which requires conversion to int based ticks to callout_reset_sbt to avoid this.
Also correct isci to correctly resolve ccb timeout.
This was based on the original work done by Eygene Ryabinkin <rea@freebsd.org> back in 5 Aug 2011 which used a macro to help avoid the overlow.
Differential Revision: https://reviews.freebsd.org/D1157 Reviewed by: mav, davide MFC after: 1 month Sponsored by: Multiplay
|
256276 |
10-Oct-2013 |
dim |
In sys/dev/hyperv, fix a number of gcc warnings about usage of anonymous union members in strict C99, by giving them names. While here, add some FreeBSD keywords where they were missing.
Approved by: re (gjb) Reviewed by: grehan
|