Skip to content

sd async probing

Hannes Reinecke linux-scsi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4block: check for GENHD_FL_UP in del_gendisk()block/genhd.c+3 -03 replies
2/4sd: Check if parent is still present before proceeding with probingdrivers/scsi/sd.c+4 -11 reply
3/4scsi: add missing get_device() return value checksdrivers/scsi/scsi_scan.c drivers/scsi/sd.c+17 -52 replies
4/4sd: use async_probe cookie to avoid deadlocksdrivers/scsi/sd.c drivers/scsi/sd.h+7 -22 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/4] sd async probing

Hi all,

here's a patchset to facilitate full async scsi disk probing. The current approach has the problem of calling async_synchronize_full_domain() during sd_remove(), which is required to wait for _all_ current asynchronous probes to complete.
When running under iSER sd_remove() is called from the RX thread directly, ie sd_remove() has to complete before RX processing can continue. But as probing has to issue I/O any response will be stuck in the RX queue, resulting in a deadlock.

This patchset breaks up the synchronization point into a per-device cookie, thus removing the global synchronisation and breaking the deadlock. But during testing some more deficiencies up and down the stack had been revealed, so we'll need the entire patchset to make it work.

As usual, comments and reviews are welcome.

Hannes Reinecke (4):
block: check for GENHD_FL_UP in del_gendisk()
sd: Check if parent is still present before proceeding with probing
scsi: add missing get_device() return value checks
sd: use async_probe cookie to avoid deadlocks

 block/genhd.c            |  3 +++
 drivers/scsi/scsi_scan.c | 14 ++++++++++++--
 drivers/scsi/sd.c        | 19 +++++++++++++------
 drivers/scsi/sd.h        |  3 +++
 4 files changed, 31 insertions(+), 8 deletions(-)
Signature · 1 line
1.8.5.6