Commit a8c18c57 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: storvsc: Add a comment to explain life-cycle management

Add a comment to explain life-cycle management and fix format issue.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ddcbf65e
...@@ -375,6 +375,21 @@ static void storvsc_remove_lun(struct work_struct *work) ...@@ -375,6 +375,21 @@ static void storvsc_remove_lun(struct work_struct *work)
kfree(wrk); 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( static inline struct storvsc_device *get_out_stor_device(
struct hv_device *device) struct hv_device *device)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment