Skip to content

vhost-scsi: IO error fixups

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v5 Latest5 patches 3 repliesIn review

Changes in v5 from the cover letter

- Bring back V1 but move flush patches to a separate clean up set
- Modify test in vhost_vq_is_setup

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5vhost: add helper to check if a vq has been setupdrivers/vhost/vhost.c drivers/vhost/vhost.h+7 -01 reply
2/5vhost scsi: alloc cmds per vq instead of sessiondrivers/vhost/scsi.c+128 -791 reply
3/5vhost scsi: fix cmd completion racedrivers/vhost/scsi.c+15 -270 replies
4/5vhost scsi: add lun parser helperdrivers/vhost/scsi.c+7 -20 replies
5/5vhost scsi: Add support for LUN resets.drivers/vhost/scsi.c+134 -130 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMaurizio LombardiPaolo BonziniJason WangStefan Hajnoczi
SeriesA-b
1/5A-b
2/5R-b
3/5R-b
4/5R-b A-b
5/5

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 [PATCH 0/5 V5] vhost-scsi: IO error fixups

The following patches were made over Michael's vhost branch:

https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git/log/?h=vhost

They fixe a couple issues where the guest is getting IO errors:
1. The admin may set num_queues and cmd_per_lun/virtqueue_size in a way that allows the guest to send more IO that vhost-scsi was coded for.

2. A race where vhost-scsi completes the cmd to the guest before it's fully completed in the target/vhost-scsi layers so if the guest sends a new IO too quicky we fail it.

3. If the real/physical storage (lio backend device) hits a transient error then vhost-scsi would fail commands instead of relying on the lower levels error recovery to do what the admin had set up.

V5:
- Bring back V1 but move flush patches to a separate clean up set
- Modify test in vhost_vq_is_setup

V4:
- really really fix compile errors
- dropped threading patches so we can figure that out separately.

V3:
- fix compile errors
- fix possible crash where cmd could be freed while adding it to completion list
- fix issue where we added the worker thread to the blk cgroup but the blk IO was submitted by a driver workqueue.

V2:
- fix use before set cpu var errors
- drop vhost_vq_is_setup
- include patches to do a worker thread per scsi IO vq