On 04/30/15 11:37, Christoph Hellwig wrote:
On Thu, Apr 30, 2015 at 10:56:42AM +0200, Bart Van Assche wrote:
Introduce the helper function srp_wait_for_queuecommand().
Move the definition of scsi_request_fn_active(). This patch
does not change any functionality. A second call to
scsi_wait_for_queuecommand() will be introduced in the next
patch.
Can we take a step back here?
This isn;t something driver should be doing, so we really should take
care of this in the SCSI midlayer.
Especially given that we don't maintain request_fn_active for blk-mq.
Hello Christoph,
How about the following:
* Modify scsi_target_block() and scsi_target_unblock(...,
SDEV_TRANSPORT_OFFLINE) such that these functions wait until
active queuecommand() calls have finished.
* Ensure that this approach works not only for the traditional
block layer but also for blk-mq.
With these changes it won't be necessary anymore to have something like
srp_wait_for_queuecommand() in the SRP transport layer.
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html