Re: [PATCH v3 0/4] Avoid that __scsi_remove_device() hangs

2017-04-18 Thread Israel Rukshin
On 4/17/2017 8:34 PM, Bart Van Assche wrote: __scsi_remove_device() hangs if it is waiting for the SYNCHRONIZE CACHE command submitted by the sd driver to finish if the block layer queue is stopped and does not get restarted. This patch series avoids that that hang occurs. Changes compared to

Re: [PATCH v2] scsi_sysfs: fix hang when removing scsi device

2017-03-16 Thread Israel Rukshin
On 3/16/2017 5:42 PM, Bart Van Assche wrote: On Thu, 2017-03-16 at 11:02 +0200, Israel Rukshin wrote: I tested your patches and the hang disappeared when fast_io_fail_tmo expired. The warning from patch 1 still exist, so we need an additional fix for that. Hello Israel, Thanks for the testing

Re: [PATCH v2] scsi_sysfs: fix hang when removing scsi device

2017-03-16 Thread Israel Rukshin
Hi Bart, I tested your patches and the hang disappeared when fast_io_fail_tmo expired. The warning from patch 1 still exist, so we need an additional fix for that. Regards, Israel On 3/16/2017 1:27 AM, Bart Van Assche wrote: On Tue, 2017-03-14 at 16:23 +0200, Israel Rukshin wrote: Patch

Re: [PATCH v2] scsi_sysfs: fix hang when removing scsi device

2017-03-14 Thread Israel Rukshin
ags; + + spin_lock_irqsave(shost->host_lock, flags); + __starget_for_each_device(starget, data, device_unblock); + spin_unlock_irqrestore(shost->host_lock, flags); + } return 0; } -- 1.8.4.3 Israel On 3/14/2017 11:44 AM, Israel Rukshin wrote: Hello

Re: [PATCH v2] scsi_sysfs: fix hang when removing scsi device

2017-03-14 Thread Israel Rukshin
Hello Bart, I applied and tested patches 3, 4 and 5. I am sorry to tell you that it didn't work. I saw the warning you added and the hang at device_del(). [ 333.696462] [ cut here ] [ 333.696471] WARNING: CPU: 11 PID: 321 at drivers/scsi/scsi_sysfs.c:1280

Re: [PATCH v2] scsi_sysfs: fix hang when removing scsi device

2017-03-12 Thread Israel Rukshin
PM, Bart Van Assche wrote: On Thu, 2017-03-09 at 18:37 +0200, Israel Rukshin wrote: The bug reproduce when unloading srp module with one port down. sd_shutdown() hangs when __scsi_remove_device() get scsi_device with state SDEV_OFFLINE or SDEV_TRANSPORT_OFFLINE. It hangs because sd_shutdown

[PATCH v2] scsi_sysfs: fix hang when removing scsi device

2017-03-09 Thread Israel Rukshin
0x8d/0x120 [] device_release_driver+0x1e/0x30 [] bus_remove_device+0xf9/0x170 [] device_del+0x127/0x240 [] __scsi_remove_device+0xc1/0xd0 [scsi_mod] [] scsi_forget_host+0x57/0x60 [scsi_mod] [] scsi_remove_host+0x72/0x110 [scsi_mod] [] srp_remove_work+0x8b/0x200 [ib_srp] ... Signed-off-by: Israel Rukshin <isra...

[PATCH] scsi_sysfs: fix hang when removing scsi device

2017-03-02 Thread Israel Rukshin
/0x60 [scsi_mod] [] scsi_remove_host+0x72/0x110 [scsi_mod] [] srp_remove_work+0x8b/0x200 [ib_srp] ... Fixes: e619e6cbe (Revert "scsi: Fix a bdi reregistration race") Signed-off-by: Israel Rukshin <isra...@mellanox.com> Reviewed-by: Max Gurtovoy <m...@mellanox.com> --- drivers/