scsi: read host_busy via scsi_host_busy()
No functional change. Just introduce scsi_host_busy() and replace the direct read of scsi_host->host_busy with this new API. Cc: Omar Sandoval <osandov@fb.com>, Cc: "Martin K. Petersen" <martin.petersen@oracle.com>, Cc: James Bottomley <james.bottomley@hansenpartnership.com>, Cc: Christoph Hellwig <hch@lst.de>, Cc: Don Brace <don.brace@microsemi.com> Cc: Kashyap Desai <kashyap.desai@broadcom.com> Cc: Mike Snitzer <snitzer@redhat.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Laurence Oberman <loberman@redhat.com> Cc: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
此提交包含在:
@@ -3250,7 +3250,7 @@ _base_recovery_check(struct MPT3SAS_ADAPTER *ioc)
|
||||
* See _wait_for_commands_to_complete() call with regards to this code.
|
||||
*/
|
||||
if (ioc->shost_recovery && ioc->pending_io_count) {
|
||||
ioc->pending_io_count = atomic_read(&ioc->shost->host_busy);
|
||||
ioc->pending_io_count = scsi_host_busy(ioc->shost);
|
||||
if (ioc->pending_io_count == 0)
|
||||
wake_up(&ioc->reset_wq);
|
||||
}
|
||||
@@ -6857,7 +6857,7 @@ mpt3sas_wait_for_commands_to_complete(struct MPT3SAS_ADAPTER *ioc)
|
||||
return;
|
||||
|
||||
/* pending command count */
|
||||
ioc->pending_io_count = atomic_read(&ioc->shost->host_busy);
|
||||
ioc->pending_io_count = scsi_host_busy(ioc->shost);
|
||||
|
||||
if (!ioc->pending_io_count)
|
||||
return;
|
||||
|
新增問題並參考
封鎖使用者