- 12 3月, 2014 1 次提交
-
-
由 Ales Novak 提交于
If the initialization of storvsc fails, the storvsc_device_destroy() causes NULL pointer dereference. storvsc_bus_scan() scsi_scan_target() __scsi_scan_target() scsi_probe_and_add_lun(hostdata=NULL) scsi_alloc_sdev(hostdata=NULL) sdev->hostdata = hostdata now the host allocation fails __scsi_remove_device(sdev) calls sdev->host->hostt->slave_destroy() == storvsc_device_destroy(sdev) access of sdev->hostdata->request_mempool Signed-off-by: NAles Novak <alnovak@suse.cz> Signed-off-by: NThomas Abraham <tabraham@suse.com> Reviewed-by: NJiri Kosina <jkosina@suse.cz> Acked-by: NK. Y. Srinivasan <kys@microsoft.com> Cc: stable@vger.kernel.org Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 29 11月, 2013 1 次提交
-
-
由 Martin K. Petersen 提交于
Some host adapters do not pass commands through to the target disk directly. Instead they provide an emulated target which may or may not accurately report its capabilities. In some cases the physical device characteristics are reported even when the host adapter is processing commands on the device's behalf. This can lead to adapter firmware hangs or excessive I/O errors. This patch disables WRITE SAME for devices connected to host adapters that provide an emulated target. Driver writers can disable WRITE SAME by setting the no_write_same flag in the host adapter template. [jejb: fix up rejections due to eh_deadline patch] Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Cc: stable@kernel.org Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 02 8月, 2013 1 次提交
-
-
由 Olaf Hering 提交于
Remove HV_DRV_VERSION, it has no meaning for upstream drivers. Initially it was supposed to show the "Linux Integration Services" version, now it is not in sync anymore with the out-of-tree drivers available from the MSFT website. The only place where a version string is still required is the KVP command "IntegrationServicesVersion" which is handled by tools/hv/hv_kvp_daemon.c. To satisfy such KVP request from the host pass the current string to the daemon during KVP userland registration. Signed-off-by: NOlaf Hering <olaf@aepfle.de> Acked-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 08 7月, 2013 3 次提交
-
-
由 K. Y. Srinivasan 提交于
Increase the value of STORVSC_MAX_IO_REQUESTS to 200 requests. The current ringbuffer size can support this higher value. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 K. Y. Srinivasan 提交于
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 K. Y. Srinivasan 提交于
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 27 6月, 2013 2 次提交
-
-
由 K. Y. Srinivasan 提交于
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 K. Y. Srinivasan 提交于
The standard scsi timeout is not appropriate in some of the environments where Hyper-V is deployed. Set this timeout appropriately for all devices managed by this driver. On cloud environments where storage latencies may be unbounded, having the scsi layer initiating recovery can be problematic since (a) the host is already implementing a variety of recovery strategies and (b) implementing a recovery strategy at the VM level may be more appropriate in cases where storage latencies exceed a certain threshold. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 24 2月, 2013 4 次提交
-
-
由 K. Y. Srinivasan 提交于
Handle LUN size changes by re-scanning the device. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 K. Y. Srinivasan 提交于
In preparation for handling additional sense codes, restructure and cleanup the error handling code in the command completion code path. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 Olaf Hering 提交于
Set scsi_device->no_write_same because the host does not support it. Also blacklist WRITE_SAME to avoid (and log) accident usage. If the guest uses the ext4 filesystem, storvsc hangs while it prints these messages in an endless loop: ... [ 161.459523] hv_storvsc vmbus_0_1: cmd 0x41 scsi status 0x2 srb status 0x6 [ 161.462157] sd 2:0:0:0: [sda] [ 161.463135] Sense Key : No Sense [current] [ 161.464983] sd 2:0:0:0: [sda] [ 161.465899] Add. Sense: No additional sense information [ 161.468211] hv_storvsc vmbus_0_1: cmd 0x41 scsi status 0x2 srb status 0x6 [ 161.475766] sd 2:0:0:0: [sda] [ 161.476728] Sense Key : No Sense [current] [ 161.478284] sd 2:0:0:0: [sda] [ 161.479441] Add. Sense: No additional sense information ... This happens with a guest running on Windows Server 2012, but happens to work while running on Windows Server 2008. WRITE_SAME isnt really supported by both versions, so disable the command usage globally. Signed-off-by: NOlaf Hering <olaf@aepfle.de> Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
由 K. Y. Srinivasan 提交于
Properly initialize scatterlist before using it. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Cc: stable@vger.kernel.org Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 26 1月, 2013 1 次提交
-
-
由 K. Y. Srinivasan 提交于
Use the consolidated GUID definitions in the Hyper-V storage driver. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 09 10月, 2012 1 次提交
-
-
由 K. Y. Srinivasan 提交于
Properly account for I/O in transit before returning from the RESET call. In the absense of this patch, we could have a situation where the host may respond to a command that was issued prior to the issuance of the RESET command at some arbitrary time after responding to the RESET command. Currently, the host does not do anything with the RESET command. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Cc: stable@vger.kernel.org Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 25 4月, 2012 1 次提交
-
-
由 K. Y. Srinivasan 提交于
Hyper-V cannot process some commands like ATA_12 and ATA_16. It also returns a very generic error when this happens (SRB_STATUS_ERROR). Most of the time we treat SRB_STATUS_ERROR as DID_TARGET_FAILURE which causes error handler retry, but in the case of pass through commands, they'll never succeed (and the error handler will offline the device), so put a discriminating block in the command completion routing and send the SRB_STATUS_ERROR upwards with DID_PASSTHROUGH for commands we know should not be retried. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 14 2月, 2012 1 次提交
-
-
由 K. Y. Srinivasan 提交于
The storage driver (storvsc_drv.c) handles all block storage devices assigned to Linux guests hosted on Hyper-V. This driver has been in the staging tree for a while and this patch moves it out of the staging area. James was willing to apply this patch during the 3.3-rc phase and a decision was taken to defer this to 3.4 since Greg had queued up a bunch of storvsc patches for 3.4. Now that Greg has applied all of the pending storvsc patches, I am sending this patch to move this driver out of staging. Based on James' recommendation, this patch gets rid of the unneeded files in the staging/hv directory. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Acked-by: NJames Bottomley <JBottomley@Parallels.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 09 2月, 2012 15 次提交
-
-
由 K. Y. Srinivasan 提交于
Consolidate all definitions that support communication with the host. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Consolidate the request structure by getting rid of struct hv_storvsc_request. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Get rid of some unused defines. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Cleanup some protocol related constants. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Cleanup the code for generating protocol version. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Miscellaneous cleanup of storvsc driver - get rid of unnecessary defines and use fixed size types for structures used for communication with the host. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Rename the context field in hv_storvsc_request. As part of this change fix the type of this field. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Get rid of the on_io_completion field in struct hv_storvsc_request. As part of this relocate the bounce buffer handling code (to avoid having forward declarations). Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Add a comment to explain life-cycle management and fix format issue. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Relocate the storvsc_remove() function to a different location in the file and invoke scsi_host_put() only after all the cleanup. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Cleanup storvsc_host_reset_handler() by getting rid of storvsc_host_reset(). Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Introduce defines for srb status codes. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Cleanup storvsc_queuecommand(). As part of this cleanup, rename the function to check if the scsi command can be sent to the host, consolidate error recovery and get rid of some dead code. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Cleanup storvsc_probe(). As part of this cleanup, get rid of storvsc_get_ide_info() by inlining the necessary code. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 K. Y. Srinivasan 提交于
Use consistent format for comments and get rid of some unnecessary comments. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 09 12月, 2011 1 次提交
-
-
由 K. Y. Srinivasan 提交于
Set the length field of the scatter gather elements correctly when we create the bounce buffer. When we use the bounce buffer for a "write" operation, the act of copying to the bounce buffer, correctly deals with this issue. However, on the "read" side, the current code was not correctly setting the buffer length. Fix this bug. Note that when we copy from the bounce buffer (for the read case), the amount we copy is controlled by the original scatter gather list given to the driver. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com> Reported-by: NDadok Milan <dadok@kvados.cz> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 02 12月, 2011 5 次提交
-
-
由 K. Y. Srinivasan 提交于
The current code implemented a per-HBA memory pool mechanism. For IDE disks managed by this driver, there is a one to one correspondance between the block device and the associated virtual HBA and since currently only IDE devices can be the boot device, this addressed the deadlock issues that were raised during the review process. This patch implements a per-lun memory pool mechanism. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 K. Y. Srinivasan 提交于
Fix a bug in copy_from_bounce_buffer(). Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 K. Y. Srinivasan 提交于
Fix a bug in storvsc_command_completion() that leaks memory when scatter/gather lists are used on the "write" side. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 K. Y. Srinivasan 提交于
The code in storvsc_device_alloc() is not needed as this would be done by default. Get rid of it. We still keep the function as we use this hook to allocate per-LUN memory pools in a later patch. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 K. Y. Srinivasan 提交于
Disable clustering, since the host side on Hyper-V requires that each I/O element not exceed the page size. As part of this cleanup, get rid of the function to merge bvecs, as the primary reason for this function was to avoid having an element exceed the page size. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 27 11月, 2011 3 次提交
-
-
由 K. Y. Srinivasan 提交于
Support hot-removing of scsi devices. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 K. Y. Srinivasan 提交于
Support hot add of scsi disks. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 K. Y. Srinivasan 提交于
In preparation for supporting hot add/remove of scsi devices, upgrade the vmstor protocol version. Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com> Signed-off-by: NHaiyang Zhang <haiyangz@microsoft.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-