[PATCH 14/22] Staging: hv: Get rid of the forward declaration of blkvsc_do_read_capacity16()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_do_read_capacity16() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 168 +++---

[PATCH 04/22] Staging: hv: Get rid of the forward declaration of blkvsc_getgeo()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_getgeo() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 162 +++--- 1 files cha

[PATCH 21/22] Staging: hv: Move module parameter to earlier in the file

2011-03-28 Thread K. Y. Srinivasan
Move module parameter to be earlier in the file. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/stag

[PATCH 13/22] Staging: hv: Get rid of the forward declaration for blkvsc_do_read_capacity()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration for blkvsc_do_read_capacity() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 152 +++---

[PATCH 00/22] Staging: hv: Cleanup-storage-drivers-phase-III

2011-03-28 Thread K. Y. Srinivasan
This patch-set deals with some of the style isues in blkvsc_drv.c. We also get rid most of the "dead code" in this file: 1) Get rid of most of the forward declarations in this file. The only remaining forward declarations are to deal with circular dependencies.

[PATCH 16/22] Staging: hv: Get rid of the forward declaration for blkvsc_do_inquiry()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration for blkvsc_do_inquiry() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 158 +++--- 1 file

[PATCH 12/22] Staging: hv: Get rid of the forward declaration for blkvsc_release()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration for blkvsc_release() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 45 +++ 1 files

[PATCH 07/22] Staging: hv: Get rid of the forward declaration of blkvsc_cmd_completion()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_cmd_completion() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 48 +++--- 1

[PATCH 05/22] Staging: hv: Get rid of the forward declaration of blkvsc_init_rw()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_init_rw() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 117 --- 1 files c

[PATCH 02/22] Staging: hv: Get rid of the forward declaration of blkvsc_media_changed()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_media_changed() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 11 +-- 1 files changed, 5 insertions(+

[PATCH 22/22] Staging: hv: Get rid of some dead code in blkvsc_drv.c

2011-03-28 Thread K. Y. Srinivasan
Get rid of some dead code in blkvsc_drv.c. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 26 -- 1 files changed, 0 insertions(+), 26 deletions(-) diff --git

[PATCH 08/22] Staging: hv: Get rid of the forward declaration of blkvsc_do_flush()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_do_flush() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 71 +++ 1 files

[PATCH 19/22] Staging: hv: Get rid of the forward declaration for blkvsc_request()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration for blkvsc_request() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 86 +++--- 1 files c

[PATCH 01/22] Staging: hv: Get rid of the forward declaration of blkvsc_submit_request()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_submit_request() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 117 --- 1

[PATCH 17/22] Staging: hv: Get rid of the forward declaration for blkvsc_do_request()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration for blkvsc_do_request() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 370 --- 1 fi

[PATCH 10/22] Staging: hv: Get rid of the forward declaration of blkvsc_remove()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_remove() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 130 +++--- 1 files cha

[PATCH 18/22] Staging: hv: Get rid of the forward declaration for blkvsc_do_pending_reqs()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration for blkvsc_do_pending_reqs() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 45 +++

[PATCH 06/22] Staging: hv: Get rid of the forward declaration of blkvsc_ioctl()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_ioctl() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 56 ++ 1 files chan

[PATCH 20/22] Staging: hv: Move some definitions/declarations to be earlier in the file

2011-03-28 Thread K. Y. Srinivasan
Move some definitions/declarations to be earlier in the file. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --

[PATCH 15/22] Staging: hv: Get rid of the forward declaration of blkvsc_revalidate_disk()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_revalidate_disk() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 32 +++- 1 files

[PATCH 11/22] Staging: hv: Get rid of the forward declaration of blkvsc_shutdown()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_shutdown() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 70 +++ 1 files

[PATCH 09/22] Staging: hv: Get rid of the forward declaration of blkvsc_cancel_pending_reqs()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_cancel_pending_reqs() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 159 +++---

[PATCH 03/22] Staging: hv: Get rid of the forward declaration of blkvsc_open()

2011-03-28 Thread K. Y. Srinivasan
Get rid of the forward declaration of blkvsc_open() by moving the code around. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c | 49 +++ 1 files chan

[PATCH 19/20] Staging: hv: Rename struct storvsc_request_extension

2011-03-28 Thread K. Y. Srinivasan
Now that all duplicate state has been eliminated from struct hv_storvsc_request and all needed state has been moved to struct storvsc_request_extension, get rid of struct hv_storvsc_request and rename struct storvsc_request_extension as struct hv_storvsc_request. Cleanup and consolidation of I/O re

[PATCH 03/20] Staging: hv: Get rid of request_ext_size from struct storvsc_driver_object

2011-03-28 Thread K. Y. Srinivasan
Now that struct storvsc_request_extension is part of struct hv_storvsc_request get rid of the field request_ext_size from struct storvsc_driver_object. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/

[PATCH 18/20] Staging: hv: Move the data_buffer field from struct hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
In preparation of consolidating all I/O request state, move the data_buffer field from struct hv_storvsc_request struct storvsc_request_extension. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvs

[PATCH 05/20] Staging: hv: Use struct completion in struct storvsc_request_extension

2011-03-28 Thread K. Y. Srinivasan
Get rid of the wait_queue mechanism for synchronization in struct storvsc_request_extension and instead use completion mechanism. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/storvsc.c | 34 +

[PATCH 02/20] Staging: hv: Embed struct storvsc_request_extension into hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
Embed struct storvsc_request_extension into hv_storvsc_request. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c |8 drivers/staging/hv/storvsc.c |3 +-- drivers/stag

[PATCH 15/20] Staging: hv: Move the context field from struct hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
In preparation of consolidating all I/O request state, move the context field from struct hv_storvsc_request to struct storvsc_request_extension. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc

[PATCH 16/20] Staging: hv: Move on_io_completion() from struct hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
In preparation of consolidating all I/O request state, move the on_io_completion() field from struct hv_storvsc_request to struct storvsc_request_extension. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/stagin

[PATCH 01/20] Staging: hv: Move the definition of struct storvsc_request_extension

2011-03-28 Thread K. Y. Srinivasan
In preperation for embedding struct storvsc_request_extension into struct hv_storvsc_request, move the definition of struct storvsc_request_extension. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/s

[PATCH 06/20] Staging: hv: Get rid of the type field from struct hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
In preparation for consolidating all I/O request state, get rid of the type field from struct hv_storvsc_request and instead use the equivalent state in struct vmscsi_request - data_in field. In the current code there is a call to zero out the struct vstor_packet in stor_vsc_on_io_request(). So, t

[PATCH 17/20] Staging: hv: Get rid of the status field from struct hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
In preparation of consolidating all I/O request state, get rid of the status field from struct hv_storvsc_request and instead use the state in the struct vmscsi_request directly. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janss

[PATCH 20/20] Staging: hv: Get rid of synch primitive in struct blkvsc_request

2011-03-28 Thread K. Y. Srinivasan
Get rid of synch primitive in struct blkvsc_request and instead use the synch primitive already embedded in the struct hv_storvsc_request structure. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blk

[PATCH 09/20] Staging: hv: Get rid of the target_id from struct hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
In preparation for consolidating all I/O request state, get rid of the target_id field from struct hv_storvsc_request and instead use the equivalent state in struct vmscsi_request - target_id field. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signe

[PATCH 13/20] Staging: hv: Get rid of sense_buffer_size from struct hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
In preparation for consolidating all I/O request state, get rid of the sense_buffer_size field from struct hv_storvsc_request and instead hardcode this value as is currently done. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janss

[PATCH 08/20] Staging: hv: Get rid of the bus field from struct hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
In preparation for consolidating all I/O request state, get rid of the bus field from struct hv_storvsc_request and instead use the equivalent state in struct vmscsi_request - path_id field. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by

[PATCH 12/20] Staging: hv: Get rid of cdb from struct hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
In preparation for consolidating all I/O request state, get rid of the cdb field from struct hv_storvsc_request and instead directly copy the command into struct vmscsi_request. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen

[PATCH 10/20] Staging: hv: Get rid of lun_id from struct hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
In preparation for consolidating all I/O request state, get rid of the lun_id field from struct hv_storvsc_request and instead use the equivalent state in struct vmscsi_request - lun field. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by:

[PATCH 07/20] Staging: hv: Get rid of the host field from struct hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
In preparation for consolidating all I/O request state, get rid of the host field from struct hv_storvsc_request and instead use the equivalent state in struct vmscsi_request - port_number field. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-o

[PATCH 14/20] Staging: hv: Move sense_buffer field

2011-03-28 Thread K. Y. Srinivasan
In preparation for consolidating all I/O request state, move sense_buffer field from struct hv_storvsc_request to struct storvsc_request_extension. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkv

[PATCH 04/20] Staging: hv: Add a function to map a hv_driver pointer to storvsc driver

2011-03-28 Thread K. Y. Srinivasan
Get rid of the need for struct hv_device to be the first element of struct host_device_context. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen --- drivers/staging/hv/blkvsc_drv.c |2 +- drivers/staging/hv/storvsc_api.

[PATCH 11/20] Staging: hv: Get rid of the cdb_len from struct hv_storvsc_request

2011-03-28 Thread K. Y. Srinivasan
In preparation for consolidating all I/O request state, get rid of the cdb_len field from struct hv_storvsc_request and instead use the equivalent state in struct vmscsi_request - cdb_length field. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed

[PATCH 00/20] Staging: hv: Cleanup-storage-drivers-phase-II

2011-03-28 Thread K. Y. Srinivasan
This patch-set restructures and cleans up struct hv_storvsc_request. In the current code, two data structures: struct hv_storvsc_request and struct storvsc_request_extension together are used to carry the I/O state and there are many issues with this current architecture: 1) The memory fo

Re: [PATCH] virtio: Decrement avail idx on buffer detach

2011-03-28 Thread Amit Shah
On (Thu) 17 Mar 2011 [17:56:59], Amit Shah wrote: > On (Thu) 17 Mar 2011 [15:26:28], Rusty Russell wrote: > > On Wed, 16 Mar 2011 19:12:10 +0530, Amit Shah wrote: > > > When detaching a buffer from a vq, the avail.idx value should be > > > decremented as well. > > > > > > This was noticed by hot-