Skip to content

Staging: hv: Cleanup-storage-drivers-phase-II

K. Y. Srinivasan lkml virtualization 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20Staging: hv: Move the definition of struct storvsc_request_extensiondrivers/staging/hv/storvsc_api.h+12 -110 replies
2/20Staging: hv: Embed struct storvsc_request_extension into hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+2 -180 replies
3/20Staging: hv: Get rid of request_ext_size from struct storvsc_driver_objectdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc_api.h drivers/staging/hv/storvsc_drv.c+4 -150 replies
4/20Staging: hv: Add a function to map a hv_driver pointer to storvsc driverdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc_api.h drivers/staging/hv/storvsc_drv.c+8 -40 replies
5/20Staging: hv: Use struct completion in struct storvsc_request_extensiondrivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h drivers/staging/hv/storvsc_drv.c+17 -300 replies
6/20Staging: hv: Get rid of the type field from struct hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+16 -140 replies
7/20Staging: hv: Get rid of the host field from struct hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+2 -40 replies
8/20Staging: hv: Get rid of the bus field from struct hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+4 -60 replies
9/20Staging: hv: Get rid of the target_id from struct hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+4 -60 replies
10/20Staging: hv: Get rid of lun_id from struct hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+4 -60 replies
11/20Staging: hv: Get rid of the cdb_len from struct hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+6 -80 replies
12/20Staging: hv: Get rid of cdb from struct hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+6 -70 replies
13/20Staging: hv: Get rid of sense_buffer_size from struct hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+1 -60 replies
14/20Staging: hv: Move sense_buffer fielddrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+5 -50 replies
15/20Staging: hv: Move the context field from struct hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc_api.h drivers/staging/hv/storvsc_drv.c+6 -70 replies
16/20Staging: hv: Move on_io_completion() from struct hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+4 -40 replies
17/20Staging: hv: Get rid of the status field from struct hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+25 -150 replies
18/20Staging: hv: Move the data_buffer field from struct hv_storvsc_requestdrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+39 -320 replies
19/20Staging: hv: Rename struct storvsc_request_extensiondrivers/staging/hv/blkvsc_drv.c drivers/staging/hv/storvsc.c drivers/staging/hv/storvsc_api.h +1 more+69 -820 replies
20/20Staging: hv: Get rid of synch primitive in struct blkvsc_requestdrivers/staging/hv/blkvsc_drv.c+15 -370 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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 for extension data structure
is allocatted just after the data buffer field in struct hv_storvsc_request resulting in comments such as this in struct blkvsc_request (blkvsc_drv.c):

/*
* !!!DO NOT ADD ANYTHING BELOW HERE!!! Otherwise, memory can overlap,
* because - The extension buffer falls right here and is pointed to by
* request.Extension;
* Which sounds like a horrible idea, who designed this? */

2) State is unnecessarily replicated in both struct hv_storvsc_request and the struct vstor_packet that is embedded in
struct storvsc_request_extension.

This patch-set addresses the above issues by geting rid of replicated state and consolidating all necessary state into a single data structure. We also deal with a range of other cleanups in this patch-set:

1) Use completion primitives to wait for completion.
2) Get rid of the synch primitive in struct blkvsc_request
3) Get rid of the need for struct hv_device to be the first element of struct host_device_context.

Regards,

K. Y