Hi Christoph,
IMHO, scan_mutex maybe still needed for other part of scsi_remove_device().
For example, device_del() in sd_remove() and scsi_sysfs_add_devices() in
scsi_finish_async_scan() should not run in parallel?
On the other hand, other parts of sd_remove(), including sd_shutdown(),
do
And what is the lock protecting if we can just release and reacquire it
safely? Probably nothing, but someone needs to do the audit carefully.
Once that is done we can just apply a patch like the one below and
be done with it:
---
>From 47572d7f0758cc0cbd979b1a2c3791f3b94c566e Mon Sep 17 00:00:0
When a device is deleted through sysfs handle "delete", the code
locks shost->scan_mutex. If multiple devices are deleted at the
same time, these deletes will be handled in series.
On the other hand, sd_shutdown() sometimes issues long latency
commands: sync cache and start_stop. It is not necessa
3 matches
Mail list logo