SCSI: set block queue at preempt only when SCSI device is put into quiesce
Simply quiesing SCSI device and waiting for completeion of IO dispatched to SCSI queue isn't safe, it is easy to use up request pool because all allocated requests before can't be dispatched when device is put in QIUESCE. Then no request can be allocated for RQF_PREEMPT, and system may hang somewhere, such as When sending commands of sync_cache or start_stop during system suspend path. Before quiesing SCSI, this patch sets block queue in preempt mode first, so no new normal request can enter queue any more, and all pending requests are drained too once blk_set_preempt_only(true) is returned. Then RQF_PREEMPT can be allocated successfully duirng SCSI quiescing. This patch fixes one long term issue of IO hang, in either block legacy and blk-mq. Change-Id: I0eedd98c9b957cd57d73a391c5f547f51ca6a6e6 Tested-by:Oleksandr Natalenko <oleksandr@natalenko.name> Tested-by:
Martin Steigerwald <martin@lichtvoll.de> Cc: stable@vger.kernel.org Cc: Bart Van Assche <Bart.VanAssche@wdc.com> Signed-off-by:
Ming Lei <ming.lei@redhat.com> Patch-mainline: linux-block@vger.kernel.org @ 03/10/2017, 22:04 Signed-off-by:
Pradeep P V K <ppvk@codeaurora.org>
Loading
Please register or sign in to comment