* [PATCH 0/2] Staging: hv: Fixup Phase II storage driver cleanup
@ 2011-04-06 18:24 K. Y. Srinivasan
2011-04-06 18:25 ` [PATCH 1/2] Staging: hv: Properly capture the error state K. Y. Srinivasan
0 siblings, 1 reply; 3+ messages in thread
From: K. Y. Srinivasan @ 2011-04-06 18:24 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization; +Cc: K. Y. Srinivasan
This fixes a couple of bugs that was introduced in the patch-set titled:
Staging: hv: Cleanup storage drivers phase II.
A corrected version of this patch-set was sent out earlier, however
the earlier (buggy) version of this patch-set was already applied.
This patch set fixes this problem..
Regards,
K. Y
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] Staging: hv: Properly capture the error state
2011-04-06 18:24 [PATCH 0/2] Staging: hv: Fixup Phase II storage driver cleanup K. Y. Srinivasan
@ 2011-04-06 18:25 ` K. Y. Srinivasan
2011-04-06 18:25 ` [PATCH 2/2] Staging: hv: Zero out the request structure on allocation K. Y. Srinivasan
0 siblings, 1 reply; 3+ messages in thread
From: K. Y. Srinivasan @ 2011-04-06 18:25 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization
Cc: K. Y. Srinivasan, Hank Janssen
Properly capture the error state after the completion of I/O. This fixes a bug
that was introduced in the patch-set titled:
Staging: hv: Cleanup-storage-drivers-phase-II.
A corrected version of this patch-set was sent out earlier, however
the earlier (buggy) version of this patch-set was already applied.
This patch fixes the problem.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/storvsc.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c
index 55865fa..d7ce393 100644
--- a/drivers/staging/hv/storvsc.c
+++ b/drivers/staging/hv/storvsc.c
@@ -279,6 +279,7 @@ static void stor_vsc_on_io_completion(struct hv_device *device,
struct hv_storvsc_request *request)
{
struct storvsc_device *stor_device;
+ struct vstor_packet *stor_pkt;
stor_device = must_get_stor_device(device);
if (!stor_device) {
@@ -287,19 +288,24 @@ static void stor_vsc_on_io_completion(struct hv_device *device,
return;
}
- DPRINT_DBG(STORVSC, "IO_COMPLETE_OPERATION - request %p "
+ DPRINT_DBG(STORVSC, "IO_COMPLETE_OPERATION - request %p "
"completed bytes xfer %u", request,
vstor_packet->vm_srb.data_transfer_length);
+ stor_pkt = &request->vstor_packet;
/* Copy over the status...etc */
+ stor_pkt->vm_srb.scsi_status = vstor_packet->vm_srb.scsi_status;
+ stor_pkt->vm_srb.srb_status = vstor_packet->vm_srb.srb_status;
+ stor_pkt->vm_srb.sense_info_length =
+ vstor_packet->vm_srb.sense_info_length;
if (vstor_packet->vm_srb.scsi_status != 0 ||
vstor_packet->vm_srb.srb_status != 1) {
DPRINT_WARN(STORVSC,
"cmd 0x%x scsi status 0x%x srb status 0x%x\n",
- vstor_packet->vm_srb.cdb[0],
+ stor_pkt->vm_srb.cdb[0],
vstor_packet->vm_srb.scsi_status,
vstor_packet->vm_srb.srb_status);
}
@@ -319,6 +325,8 @@ static void stor_vsc_on_io_completion(struct hv_device *device,
}
}
+ stor_pkt->vm_srb.data_transfer_length =
+ vstor_packet->vm_srb.data_transfer_length;
request->on_io_completion(request);
@@ -535,6 +543,7 @@ int stor_vsc_on_io_request(struct hv_device *device,
request->device = device;
+
vstor_packet->flags |= REQUEST_COMPLETION_FLAG;
vstor_packet->vm_srb.length = sizeof(struct vmscsi_request);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] Staging: hv: Zero out the request structure on allocation
2011-04-06 18:25 ` [PATCH 1/2] Staging: hv: Properly capture the error state K. Y. Srinivasan
@ 2011-04-06 18:25 ` K. Y. Srinivasan
0 siblings, 0 replies; 3+ messages in thread
From: K. Y. Srinivasan @ 2011-04-06 18:25 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, virtualization
Cc: K. Y. Srinivasan, Hank Janssen
As part of the cleanup of the I/O request structure, allocate them zeroed
out. This fixes a bug that was introduced in the patch-set titled:
Staging: hv: Cleanup-storage-drivers-phase-II.
A corrected version of this patch-set was sent out earlier, however
the earlier (buggy) version of this patch-set was already applied.
This patch fixes the problem.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
drivers/staging/hv/storvsc_drv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 6128ffd..ae61735 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -738,7 +738,7 @@ static int storvsc_queuecommand_lck(struct scsi_cmnd *scmnd,
request_size = sizeof(struct storvsc_cmd_request);
- cmd_request = kmem_cache_alloc(host_device_ctx->request_pool,
+ cmd_request = kmem_cache_zalloc(host_device_ctx->request_pool,
GFP_ATOMIC);
if (!cmd_request) {
DPRINT_ERR(STORVSC_DRV, "scmnd (%p) - unable to allocate "
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-06 18:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-06 18:24 [PATCH 0/2] Staging: hv: Fixup Phase II storage driver cleanup K. Y. Srinivasan
2011-04-06 18:25 ` [PATCH 1/2] Staging: hv: Properly capture the error state K. Y. Srinivasan
2011-04-06 18:25 ` [PATCH 2/2] Staging: hv: Zero out the request structure on allocation K. Y. Srinivasan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).