Stefan Hajnoczi
2019-Sep-06 08:54 UTC
[PATCH v2] scsi: virtio_scsi: unplug LUNs when events missed
On Thu, Sep 05, 2019 at 06:19:28PM +0000, Matt Lupfer wrote:> The event handler calls scsi_scan_host() when events are missed, which > will hotplug new LUNs. However, this function won't remove any > unplugged LUNs. The result is that hotunplug doesn't work properly when > the number of unplugged LUNs exceeds the event queue size (currently 8). > > Scan existing LUNs when events are missed to check if they are still > present. If not, remove them. > > Signed-off-by: Matt Lupfer <mlupfer at ddn.com> > --- > drivers/scsi/virtio_scsi.c | 33 +++++++++++++++++++++++++++++++++ > 1 file changed, 33 insertions(+)Please include a changelog in future patch revisions. For example: Signed-off-by: ... --- v2: * Replaced magic constants with sd.h constants [Michael] Just C and virtio code review, no SCSI specifics: Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: not available URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20190906/70a23447/attachment.sig>
Paolo Bonzini
2019-Sep-09 16:55 UTC
[PATCH v2] scsi: virtio_scsi: unplug LUNs when events missed
On 06/09/19 10:54, Stefan Hajnoczi wrote:> On Thu, Sep 05, 2019 at 06:19:28PM +0000, Matt Lupfer wrote: >> The event handler calls scsi_scan_host() when events are missed, which >> will hotplug new LUNs. However, this function won't remove any >> unplugged LUNs. The result is that hotunplug doesn't work properly when >> the number of unplugged LUNs exceeds the event queue size (currently 8). >> >> Scan existing LUNs when events are missed to check if they are still >> present. If not, remove them. >> >> Signed-off-by: Matt Lupfer <mlupfer at ddn.com> >> --- >> drivers/scsi/virtio_scsi.c | 33 +++++++++++++++++++++++++++++++++ >> 1 file changed, 33 insertions(+) > > Please include a changelog in future patch revisions. For example: > > Signed-off-by: ... > --- > v2: > * Replaced magic constants with sd.h constants [Michael] > > Just C and virtio code review, no SCSI specifics: > > Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com> >Acked-by: Paolo Bonzini <pbonzini at redhat.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: OpenPGP digital signature URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20190909/d26eae96/attachment.sig>
Possibly Parallel Threads
- [PATCH] scsi: virtio_scsi: unplug LUNs when events missed
- [PATCH v2] scsi: virtio_scsi: unplug LUNs when events missed
- [PATCH 0/1] virtio-scsi: fix missing unplug events when all LUNs are unplugged at the same time
- [PATCH 1/1] scsi: virtio-scsi: handle correctly case when all LUNs were unplugged
- How To change server recovery timeout