Skip to content

target: TMF and recovery fixes

Mike Christie linux-scsi target-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 11 repliesIn review

v4 from the cover letter

- Fix
[PATCH v3 07/14] scsi: target: Fix multiple LUN_RESET handling so it doesn't add back the bug where resets can wait on each other and deadlock.
- Updated
[PATCH v3 06/14] scsi: target: iscsit: Fix TAS handling during conn so it handles the case where commands have passed the STOP checks and have not yet hit them.
- Added patch to handle another hang found while testnig where we wait on the free_compl but never drop a ref due to being in the wrong state. v3:
- Drop patch "iscsit: Fix isert disconnect handling during login"
- Add patch to drop cmd lock in completion callout
- Add patch to clean up recovery commands earlier when ERL2 is used
- Add patch to handle use-after-free in isert

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18scsi: target: Move sess cmd counter to new structdrivers/target/target_core_tpg.c drivers/target/target_core_transport.c include/target/iscsi/iscsi_target_core.h +1 more+107 -440 replies
2/18scsi: target: Move cmd counter allocationdrivers/target/iscsi/iscsi_target_login.c drivers/target/target_core_internal.h drivers/target/target_core_transport.c +2 more+42 -430 replies
3/18scsi: target: Pass in cmd counter to use during cmd setupdrivers/target/iscsi/iscsi_target.c drivers/target/target_core_transport.c drivers/target/target_core_xcopy.c +2 more+30 -280 replies
4/18scsi: target: iscsit/isert: Alloc per conn cmd counterdrivers/infiniband/ulp/isert/ib_isert.c drivers/target/iscsi/iscsi_target.c drivers/target/iscsi/iscsi_target_login.c +2 more+20 -170 replies
5/18scsi: target: iscsit: stop/wait on cmds during conn closedrivers/target/iscsi/iscsi_target.c+10 -00 replies
6/18scsi: target: Drop t_state_lock use in compare_and_write_postdrivers/target/target_core_sbc.c+0 -20 replies
7/18scsi: target: Treat CMD_T_FABRIC_STOP like CMD_T_STOPdrivers/target/target_core_sbc.c drivers/target/target_core_transport.c+17 -123 replies
8/18scsi: target: iscsit: Add helper to check when cmd has faileddrivers/target/iscsi/iscsi_target_configfs.c include/target/iscsi/iscsi_target_core.h+6 -20 replies
9/18scsi: target: iscsit: Cleanup isert commands at conn closuredrivers/target/iscsi/iscsi_target.c drivers/target/iscsi/iscsi_target_util.c+32 -90 replies
10/18IB/isert: Fix hang in target_wait_for_cmdsdrivers/infiniband/ulp/isert/ib_isert.c+0 -120 replies
11/18IB/isert: Fix use after free during conn cleanupdrivers/infiniband/ulp/isert/ib_isert.c+1 -11 reply
12/18scsi: target: iscsit: free cmds before session freedrivers/target/iscsi/iscsi_target.c+3 -30 replies
13/18scsi: target: Fix multiple LUN_RESET handlingdrivers/target/target_core_device.c drivers/target/target_core_tmr.c drivers/target/target_core_transport.c +1 more+74 -117 replies
14/18scsi: target: Don't set CMD_T_FABRIC_STOP for aborted tasksdrivers/target/target_core_transport.c+6 -30 replies
15/18scsi: target: iscsit: Fix TAS handling during conn cleanupdrivers/target/iscsi/iscsi_target.c+29 -230 replies
16/18scsi: target: drop tas arg from __transport_wait_for_tasksdrivers/target/target_core_transport.c+8 -140 replies
17/18scsi: target: Remove sess_cmd_lockdrivers/target/target_core_tmr.c drivers/target/target_core_transport.c include/target/target_core_base.h+0 -130 replies
18/18scsi: target: Move tag pr_debug to before we do a put on the cmddrivers/target/target_core_transport.c+3 -20 replies

Reviews trailers per patch

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

PatchMaurizio LombardiSagi GrimbergDmitry Bogdanov
1/18R-b
2/18
3/18
4/18
5/18R-b
6/18
7/18
8/18R-b
9/18
10/18R-b
11/18R-b R-b
12/18R-b
13/18
14/18
15/18
16/18R-b
17/18
18/18

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

Read the v1 thread

Cover letter [PATCH 00/18] target: TMF and recovery fixes

The following patches apply over Martin's 6.4 branches and Linus's tree. They fix a couple regressions/bugs in iscsit that occur when there are multiple sessions accessing the same se_device and TMRs are executing and a connection is closed. And they fix some bugs in isert for the single session case when there are TMRs executing and the connection is closed. It also includes Dimitry's fix for cmd cleanup when ERL2 is used.

v4:
- Fix
[PATCH v3 07/14] scsi: target: Fix multiple LUN_RESET handling so it doesn't add back the bug where resets can wait on each other and deadlock.
- Updated
[PATCH v3 06/14] scsi: target: iscsit: Fix TAS handling during conn so it handles the case where commands have passed the STOP checks and have not yet hit them.
- Added patch to handle another hang found while testnig where we wait on the free_compl but never drop a ref due to being in the wrong state. v3:
- Drop patch "iscsit: Fix isert disconnect handling during login"
- Add patch to drop cmd lock in completion callout
- Add patch to clean up recovery commands earlier when ERL2 is used
- Add patch to handle use-after-free in isert
v2:
- Fix wait/stop use during login failures
- Add patches to support isert