]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: convert target_busy to an atomic_t
authorChristoph Hellwig <hch@lst.de>
Wed, 22 Jan 2014 13:49:41 +0000 (14:49 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 25 Jul 2014 11:39:00 +0000 (07:39 -0400)
commit8ae20a1312f51609e059cbcb829e22f6cd4310ab
tree9b4cf362095370eeb5c42d21dc33746d0ba088bd
parent5528e3101dae1019880c467ca05b9b55daf77318
scsi: convert target_busy to an atomic_t

Avoid taking the host-wide host_lock to check the per-target queue limit.
Instead we do an atomic_inc_return early on to grab our slot in the queue,
and if necessary decrement it after finishing all checks.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Webb Scales <webbnh@hp.com>
Acked-by: Jens Axboe <axboe@kernel.dk>
Tested-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Robert Elliott <elliott@hp.com>
drivers/scsi/scsi_lib.c
include/scsi/scsi_device.h