Skip to content

tcm_fc fixes

Hannes Reinecke linux-scsi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6target: fix hang in target_wait_for_sess_cmds()drivers/target/target_core_transport.c+10 -61 reply
2/6target: fix potential race window in target_sess_cmd_list_waiting()drivers/target/target_core_transport.c+7 -51 reply
3/6target/tcm_fc: print command pointer in debug messagedrivers/target/tcm_fc/tfc_cmd.c+1 -10 replies
4/6target/tcm_fc: return detailed error in ft_sess_create()drivers/target/tcm_fc/tfc_sess.c+3 -20 replies
5/6target/tcm_fc: Update debugging statements to match libfc usagedrivers/target/tcm_fc/tfc_sess.c+26 -111 reply
6/6target/tcm_fc: use CPU affinity for responsesdrivers/target/tcm_fc/tfc_cmd.c+1 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/6] tcm_fc fixes

Hi Nic,

here's a set of patches and fixes I've found during debugging FCoE over virtio.
The first two fix a race condition I've encountered during starting and stopping initiators; they are similar to your prior patches, but I still think they should be applied to avoid any race issues. The next three are just minor cleanups, but the last one is _absolutely_ crucial.
With the current code tcm_fc will behave _very_ odd if you're running in a virtualized environment, as the xid allocator in libfc will be thouroughly thrashed by sending frames on _other_ cpus than those the originator frame got received on.
This causes frames to be delayed (by up to several minutes) leading to I/O errors on the initiator side.

As usual, comments and reviews are welcome.

Hannes Reinecke (6):
target: fix hang in target_wait_for_sess_cmds()
target: fix potential race window in target_sess_cmd_list_waiting() target/tcm_fc: print command pointer in debug message target/tcm_fc: return detailed error in ft_sess_create() target/tcm_fc: Update debugging statements to match libfc usage target/tcm_fc: use CPU affinity for responses

 drivers/target/target_core_transport.c | 28 ++++++++++++++---------
 drivers/target/tcm_fc/tfc_cmd.c        |  4 ++--
 drivers/target/tcm_fc/tfc_sess.c       | 42 +++++++++++++++++++++++-----------
 3 files changed, 48 insertions(+), 26 deletions(-)
Signature · 1 line
1.8.5.6