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 into master

Pull SCSI fix from James Bottomley:
"Small core patch to fix a corner case bug: we forgot to run the queues
to handle starvation in the error exit from the scsi_queue_rq routine,
which can lead to hangs on error conditions"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: core: Run queue in case of I/O resource contention failure

+11 -5
+11 -5
drivers/scsi/scsi_lib.c
··· 547 547 scsi_uninit_cmd(cmd); 548 548 } 549 549 550 + static void scsi_run_queue_async(struct scsi_device *sdev) 551 + { 552 + if (scsi_target(sdev)->single_lun || 553 + !list_empty(&sdev->host->starved_list)) 554 + kblockd_schedule_work(&sdev->requeue_work); 555 + else 556 + blk_mq_run_hw_queues(sdev->request_queue, true); 557 + } 558 + 550 559 /* Returns false when no more bytes to process, true if there are more */ 551 560 static bool scsi_end_request(struct request *req, blk_status_t error, 552 561 unsigned int bytes) ··· 600 591 601 592 __blk_mq_end_request(req, error); 602 593 603 - if (scsi_target(sdev)->single_lun || 604 - !list_empty(&sdev->host->starved_list)) 605 - kblockd_schedule_work(&sdev->requeue_work); 606 - else 607 - blk_mq_run_hw_queues(q, true); 594 + scsi_run_queue_async(sdev); 608 595 609 596 percpu_ref_put(&q->q_usage_counter); 610 597 return false; ··· 1707 1702 */ 1708 1703 if (req->rq_flags & RQF_DONTPREP) 1709 1704 scsi_mq_uninit_cmd(cmd); 1705 + scsi_run_queue_async(sdev); 1710 1706 break; 1711 1707 } 1712 1708 return ret;