Skip to content

asynchronous ALUA device handler

Hannes Reinecke linux-scsi 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest36 patches 22 repliesIn review
  2. v423 patches 69 repliesSuperseded
  3. v220 patches 17 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v117 patches44 repliesSuperseded

Changes to v1 from the cover letter

- Split off rtpg workqueue into separate items
- User per-port workqueues
- Incorporate review from Bart
- Incorporate review from hch

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/36scsi_dh: move 'dh_state' sysfs attribute to generic codedrivers/scsi/scsi_dh.c drivers/scsi/scsi_sysfs.c+59 -671 reply
2/36scsi: ignore errors from scsi_dh_add_device()drivers/scsi/scsi_sysfs.c+4 -30 replies
3/36scsi_dh_alua: Disable ALUA handling for non-disk devicesdrivers/scsi/device_handler/scsi_dh_alua.c+12 -00 replies
4/36scsi_dh_alua: Use vpd_pg83 informationdrivers/scsi/device_handler/scsi_dh_alua.c+13 -700 replies
5/36scsi_dh_alua: improved loggingdrivers/scsi/device_handler/scsi_dh_alua.c+8 -20 replies
6/36scsi_dh_alua: sanitze sense code handlingdrivers/scsi/device_handler/scsi_dh_alua.c+7 -111 reply
7/36scsi_dh_alua: use standard logging functionsdrivers/scsi/device_handler/scsi_dh_alua.c+13 -141 reply
8/36scsi_dh_alua: return standard SCSI return codes in submit_rtpgdrivers/scsi/device_handler/scsi_dh_alua.c+17 -162 replies
9/36scsi_dh_alua: fixup description of stpg_endio()drivers/scsi/device_handler/scsi_dh_alua.c+2 -40 replies
10/36scsi: remove scsi_show_sense_hdr()include/scsi/scsi_dbg.h+0 -20 replies
11/36scsi_dh_alua: use flag for RTPG extended headerdrivers/scsi/device_handler/scsi_dh_alua.c+7 -80 replies
12/36scsi_dh_alua: use unaligned access macrosdrivers/scsi/device_handler/scsi_dh_alua.c+8 -151 reply
13/36scsi_dh_alua: Pass buffer as function argumentdrivers/scsi/device_handler/scsi_dh_alua.c+7 -60 replies
14/36scsi_dh_alua: separate out alua_stpg()drivers/scsi/device_handler/scsi_dh_alua.c+52 -343 replies
15/36scsi_dh_alua: Make stpg synchronousdrivers/scsi/device_handler/scsi_dh_alua.c+50 -832 replies
16/36scsi_dh_alua: call alua_rtpg() if stpg failsdrivers/scsi/device_handler/scsi_dh_alua.c+2 -01 reply
17/36scsi_dh_alua: switch to scsi_execute_req_flags()drivers/scsi/device_handler/scsi_dh_alua.c+36 -890 replies
18/36scsi_dh_alua: rework alua_check_tpgs() to return the tpgs modedrivers/scsi/device_handler/scsi_dh_alua.c+11 -140 replies
19/36scsi_dh_alua: Use separate alua_port_group structuredrivers/scsi/device_handler/scsi_dh_alua.c include/scsi/scsi_dh.h+155 -730 replies
20/36scsi_dh_alua: allocate RTPG buffer separatelydrivers/scsi/device_handler/scsi_dh_alua.c+21 -350 replies
21/36scsi_dh_alua: simplify sense code handlingdrivers/scsi/device_handler/scsi_dh_alua.c+10 -260 replies
22/36scsi: Add scsi_vpd_lun_id()drivers/scsi/scsi_lib.c include/scsi/scsi_device.h+133 -00 replies
23/36scsi_dh_alua: use unique device iddrivers/scsi/device_handler/scsi_dh_alua.c+62 -30 replies
24/36scsi: Add scsi_vpd_tpg_id()drivers/scsi/scsi_lib.c include/scsi/scsi_device.h+43 -00 replies
25/36scsi_dh_alua: simplify alua_initialize()drivers/scsi/device_handler/scsi_dh_alua.c+34 -650 replies
26/36revert "scsi_dh_alua: ALUA hander attach should succeed while TPG is transitioning"drivers/scsi/device_handler/scsi_dh_alua.c+12 -190 replies
27/36scsi_dh_alua: Use workqueue for RTPGdrivers/scsi/device_handler/scsi_dh_alua.c+267 -602 replies
28/36scsi_dh_alua: Recheck state on unit attentiondrivers/scsi/device_handler/scsi_dh_alua.c+47 -110 replies
29/36scsi_dh_alua: update all port statesdrivers/scsi/device_handler/scsi_dh_alua.c+22 -90 replies
30/36scsi_dh_alua: Send TEST UNIT READY to poll for transitioningdrivers/scsi/device_handler/scsi_dh_alua.c+37 -00 replies
31/36scsi: rescan VPD attributesdrivers/scsi/scsi.c drivers/scsi/scsi_lib.c drivers/scsi/scsi_scan.c +3 more+55 -180 replies
32/36scsi_dh: add 'rescan' callbackdrivers/scsi/device_handler/scsi_dh_alua.c drivers/scsi/scsi_lib.c drivers/scsi/scsi_scan.c +1 more+17 -10 replies
33/36scsi: Add 'access_state' attributedrivers/scsi/scsi_scan.c drivers/scsi/scsi_sysfs.c include/scsi/scsi_device.h +1 more+64 -01 reply
34/36scsi_dh_alua: use common definitions for ALUA statedrivers/scsi/device_handler/scsi_dh_alua.c+27 -350 replies
35/36scsi_dh_alua: update 'access_state' fielddrivers/scsi/device_handler/scsi_dh_alua.c+29 -00 replies
36/36scsi_dh_alua: Update version to 2.0drivers/scsi/device_handler/scsi_dh_alua.c+1 -10 replies

Reviews trailers per patch

18 of 36 patches have a Reviewed-by or Acked-by.

PatchBart Van AsscheChristoph HellwigMartin K. PetersenEwan Milne
1/36R-b R-b
2/36
3/36R-b R-b R-b
4/36R-b R-b
5/36R-b R-b
6/36R-b
7/36
8/36
9/36R-b R-b
10/36R-b R-b R-b
11/36R-b R-b R-b
12/36R-b R-b R-b
13/36R-b R-b R-b
14/36
15/36
16/36R-b
17/36R-b R-b
18/36
19/36R-b
20/36R-b R-b
21/36R-b R-b
22/36R-b R-b
23/36
24/36
25/36
26/36R-b
27/36
28/36
29/36
30/36R-b
31/36
32/36
33/36
34/36
35/36
36/36

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v5 thread

Cover letter [PATCHv5 00/36] asynchronous ALUA device handler

Hi all,

here the next round of my update to the ALUA device handler. The main features are:

- Topology discovery: the device handler creates a separate port_group structure, which is used to update all paths to the same port group. With that we achieve a significant reduction of the number of RTPGs.
- Asynchronous state update: The ALUA state is now updated from a workqueue item, so all concurrent RTPG calls are coaleasced. The ALUA state update is also triggered by sense codes indicating an ALUA state change.
- Use the existing vpd page 0x83 to detect device IDs
- Add generic 'access_state' attribute to discover the current ALUA state from userspace.

The entire tree can be found at

kernel/hare/scsi-devel branch alua.v5

on git.kernel.org

As usual, reviews and comments are welcome.

Changes to v1:
- Split off rtpg workqueue into separate items
- User per-port workqueues
- Incorporate review from Bart
- Incorporate review from hch
Changes to v2:
- Fixup patch descriptions
- Split off 'Improve error handling' patch
Changes to v3:
- Implement generic 'scsi_vpd_lun_id()' function to parse vpd page 0x83
Changes to v4:
- Revert back to a single workqueue item
- Implement generic 'scsi_vpd_tpg_id()' function
- Add 'access_state' attribute to struct scsi_device
- Incorporate review from Ewan Milne
- Incorporate further reviews from hch
- Reshuffle patches

Hannes Reinecke (36):
scsi_dh: move 'dh_state' sysfs attribute to generic code
scsi: ignore errors from scsi_dh_add_device()
scsi_dh_alua: Disable ALUA handling for non-disk devices
scsi_dh_alua: Use vpd_pg83 information
scsi_dh_alua: improved logging
scsi_dh_alua: sanitze sense code handling
scsi_dh_alua: use standard logging functions
scsi_dh_alua: return standard SCSI return codes in submit_rtpg
scsi_dh_alua: fixup description of stpg_endio()
scsi: remove scsi_show_sense_hdr()
scsi_dh_alua: use flag for RTPG extended header
scsi_dh_alua: use unaligned access macros
scsi_dh_alua: Pass buffer as function argument
scsi_dh_alua: separate out alua_stpg()
scsi_dh_alua: Make stpg synchronous
scsi_dh_alua: call alua_rtpg() if stpg fails
scsi_dh_alua: switch to scsi_execute_req_flags()
scsi_dh_alua: rework alua_check_tpgs() to return the tpgs mode
scsi_dh_alua: Use separate alua_port_group structure
scsi_dh_alua: allocate RTPG buffer separately
scsi_dh_alua: simplify sense code handling
scsi: Add scsi_vpd_lun_id()
scsi_dh_alua: use unique device id
scsi: Add scsi_vpd_tpg_id()
scsi_dh_alua: simplify alua_initialize()
revert "scsi_dh_alua: ALUA hander attach should succeed while TPG is
transitioning"
scsi_dh_alua: Use workqueue for RTPG
scsi_dh_alua: Recheck state on unit attention
scsi_dh_alua: update all port states
scsi_dh_alua: Send TEST UNIT READY to poll for transitioning
scsi: rescan VPD attributes
scsi_dh: add 'rescan' callback
scsi: Add 'access_state' attribute
scsi_dh_alua: use common definitions for ALUA state
scsi_dh_alua: update 'access_state' field
scsi_dh_alua: Update version to 2.0

 drivers/scsi/device_handler/scsi_dh_alua.c | 1173 +++++++++++++++++-----------
 drivers/scsi/scsi.c                        |   20 +-
 drivers/scsi/scsi_dh.c                     |   68 +-
 drivers/scsi/scsi_lib.c                    |  184 +++++
 drivers/scsi/scsi_scan.c                   |   11 +
 drivers/scsi/scsi_sysfs.c                  |  122 ++-
 drivers/scsi/ses.c                         |   13 +-
 include/scsi/scsi_dbg.h                    |    2 -
 include/scsi/scsi_device.h                 |    4 +
 include/scsi/scsi_dh.h                     |    2 +
 include/scsi/scsi_proto.h                  |   13 +
 11 files changed, 1081 insertions(+), 531 deletions(-)
Signature · 1 line
1.8.5.6