Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288938
b: refs/heads/master
c: a8c18c5
h: refs/heads/master
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Feb 9, 2012
1 parent b7e48f1 commit 64f2af2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ddcbf65e484c3473d3e808718ddb6c8166822c4c
refs/heads/master: a8c18c573bf896f81dbcd68fdb81d81d4200dcad
17 changes: 16 additions & 1 deletion trunk/drivers/staging/hv/storvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,21 @@ static void storvsc_remove_lun(struct work_struct *work)
kfree(wrk);
}

/*
* We can get incoming messages from the host that are not in response to
* messages that we have sent out. An example of this would be messages
* received by the guest to notify dynamic addition/removal of LUNs. To
* deal with potential race conditions where the driver may be in the
* midst of being unloaded when we might receive an unsolicited message
* from the host, we have implemented a mechanism to gurantee sequential
* consistency:
*
* 1) Once the device is marked as being destroyed, we will fail all
* outgoing messages.
* 2) We permit incoming messages when the device is being destroyed,
* only to properly account for messages already sent out.
*/

static inline struct storvsc_device *get_out_stor_device(
struct hv_device *device)
{
Expand Down Expand Up @@ -569,7 +584,7 @@ static void storvsc_on_io_completion(struct hv_device *device,
*/

if ((stor_pkt->vm_srb.cdb[0] == INQUIRY) ||
(stor_pkt->vm_srb.cdb[0] == MODE_SENSE)) {
(stor_pkt->vm_srb.cdb[0] == MODE_SENSE)) {
vstor_packet->vm_srb.scsi_status = 0;
vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS;
}
Expand Down

0 comments on commit 64f2af2

Please sign in to comment.