Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fix from James Bottomley:
"A single fix for a race introduced by a fix that went into 5.14-rc5"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: core: Fix hang of freezing queue between blocking and running device

+6 -3
+6 -3
drivers/scsi/scsi_sysfs.c
··· 808 808 ret = scsi_device_set_state(sdev, state); 809 809 /* 810 810 * If the device state changes to SDEV_RUNNING, we need to 811 - * rescan the device to revalidate it, and run the queue to 812 - * avoid I/O hang. 811 + * run the queue to avoid I/O hang, and rescan the device 812 + * to revalidate it. Running the queue first is necessary 813 + * because another thread may be waiting inside 814 + * blk_mq_freeze_queue_wait() and because that call may be 815 + * waiting for pending I/O to finish. 813 816 */ 814 817 if (ret == 0 && state == SDEV_RUNNING) { 815 - scsi_rescan_device(dev); 816 818 blk_mq_run_hw_queues(sdev->request_queue, true); 819 + scsi_rescan_device(dev); 817 820 } 818 821 mutex_unlock(&sdev->state_mutex); 819 822