Loading Documentation/block/biodoc.txt +0 −4 Original line number Diff line number Diff line Loading @@ -827,10 +827,6 @@ but in the event of any barrier requests in the tag queue we need to ensure that requests are restarted in the order they were queue. This may happen if the driver needs to use blk_queue_invalidate_tags(). Tagging also defines a new request flag, REQ_QUEUED. This is set whenever a request is currently tagged. You should not use this flag directly, blk_rq_tagged(rq) is the portable way to do so. 3.3 I/O Submission The routine submit_bio() is used to submit a single io. Higher level i/o Loading Documentation/scsi/scsi_mid_low_api.txt +5 −45 Original line number Diff line number Diff line Loading @@ -271,9 +271,9 @@ init_this_scsi_driver() ----+ slave_destroy() *** ------------------------------------------------------------ The mid level invokes scsi_adjust_queue_depth() with tagged queuing off and "cmd_per_lun" for that host as the queue length. These settings can be overridden by a slave_configure() supplied by the LLD. The mid level invokes scsi_adjust_queue_depth() with "cmd_per_lun" for that host as the queue length. These settings can be overridden by a slave_configure() supplied by the LLD. *** For scsi devices that the mid level tries to scan but do not respond, a slave_alloc(), slave_destroy() pair is called. Loading Loading @@ -366,13 +366,11 @@ is initialized. The functions below are listed alphabetically and their names all start with "scsi_". Summary: scsi_activate_tcq - turn on tag command queueing scsi_add_device - creates new scsi device (lu) instance scsi_add_host - perform sysfs registration and set up transport class scsi_adjust_queue_depth - change the queue depth on a SCSI device scsi_bios_ptable - return copy of block device's partition table scsi_block_requests - prevent further commands being queued to given host scsi_deactivate_tcq - turn off tag command queueing scsi_host_alloc - return a new scsi_host instance whose refcount==1 scsi_host_get - increments Scsi_Host instance's refcount scsi_host_put - decrements Scsi_Host instance's refcount (free if 0) Loading @@ -389,24 +387,6 @@ Summary: Details: /** * scsi_activate_tcq - turn on tag command queueing ("ordered" task attribute) * @sdev: device to turn on TCQ for * @depth: queue depth * * Returns nothing * * Might block: no * * Notes: Eventually, it is hoped depth would be the maximum depth * the device could cope with and the real queue depth * would be adjustable from 0 to depth. * * Defined (inline) in: include/scsi/scsi_tcq.h **/ void scsi_activate_tcq(struct scsi_device *sdev, int depth) /** * scsi_add_device - creates new scsi device (lu) instance * @shost: pointer to scsi host instance Loading Loading @@ -458,9 +438,6 @@ int scsi_add_host(struct Scsi_Host *shost, struct device * dev) /** * scsi_adjust_queue_depth - allow LLD to change queue depth on a SCSI device * @sdev: pointer to SCSI device to change queue depth on * @tagged: 0 - no tagged queuing * MSG_SIMPLE_TAG - simple tagged queuing * MSG_ORDERED_TAG - ordered tagged queuing * @tags Number of tags allowed if tagged queuing enabled, * or number of commands the LLD can queue up * in non-tagged mode (as per cmd_per_lun). Loading @@ -471,15 +448,12 @@ int scsi_add_host(struct Scsi_Host *shost, struct device * dev) * * Notes: Can be invoked any time on a SCSI device controlled by this * LLD. [Specifically during and after slave_configure() and prior to * slave_destroy().] Can safely be invoked from interrupt code. Actual * queue depth change may be delayed until the next command is being * processed. See also scsi_activate_tcq() and scsi_deactivate_tcq(). * slave_destroy().] Can safely be invoked from interrupt code. * * Defined in: drivers/scsi/scsi.c [see source code for more notes] * **/ void scsi_adjust_queue_depth(struct scsi_device * sdev, int tagged, int tags) void scsi_adjust_queue_depth(struct scsi_device *sdev, int tags) /** Loading Loading @@ -514,20 +488,6 @@ unsigned char *scsi_bios_ptable(struct block_device *dev) void scsi_block_requests(struct Scsi_Host * shost) /** * scsi_deactivate_tcq - turn off tag command queueing * @sdev: device to turn off TCQ for * @depth: queue depth (stored in sdev) * * Returns nothing * * Might block: no * * Defined (inline) in: include/scsi/scsi_tcq.h **/ void scsi_deactivate_tcq(struct scsi_device *sdev, int depth) /** * scsi_host_alloc - create a scsi host adapter instance and perform basic * initialization. Loading Documentation/scsi/st.txt +5 −3 Original line number Diff line number Diff line Loading @@ -506,9 +506,11 @@ user does not request data that far.) DEBUGGING HINTS To enable debugging messages, edit st.c and #define DEBUG 1. As seen above, debugging can be switched off with an ioctl if debugging is compiled into the driver. The debugging output is not voluminous. Debugging code is now compiled in by default but debugging is turned off with the kernel module parameter debug_flag defaulting to 0. Debugging can still be switched on and off with an ioctl. To enable debug at module load time add debug_flag=1 to the module load options, the debugging output is not voluminous. If the tape seems to hang, I would be very interested to hear where the driver is waiting. With the command 'ps -l' you can see the state Loading block/blk-core.c +2 −2 Original line number Diff line number Diff line Loading @@ -1266,7 +1266,7 @@ void blk_requeue_request(struct request_queue *q, struct request *rq) blk_clear_rq_complete(rq); trace_block_rq_requeue(q, rq); if (blk_rq_tagged(rq)) if (rq->cmd_flags & REQ_QUEUED) blk_queue_end_tag(q, rq); BUG_ON(blk_queued_rq(rq)); Loading Loading @@ -2554,7 +2554,7 @@ EXPORT_SYMBOL_GPL(blk_unprep_request); */ void blk_finish_request(struct request *req, int error) { if (blk_rq_tagged(req)) if (req->cmd_flags & REQ_QUEUED) blk_queue_end_tag(req->q, req); BUG_ON(blk_queued_rq(req)); Loading block/blk-mq-tag.c +28 −0 Original line number Diff line number Diff line Loading @@ -584,6 +584,34 @@ int blk_mq_tag_update_depth(struct blk_mq_tags *tags, unsigned int tdepth) return 0; } /** * blk_mq_unique_tag() - return a tag that is unique queue-wide * @rq: request for which to compute a unique tag * * The tag field in struct request is unique per hardware queue but not over * all hardware queues. Hence this function that returns a tag with the * hardware context index in the upper bits and the per hardware queue tag in * the lower bits. * * Note: When called for a request that is queued on a non-multiqueue request * queue, the hardware context index is set to zero. */ u32 blk_mq_unique_tag(struct request *rq) { struct request_queue *q = rq->q; struct blk_mq_hw_ctx *hctx; int hwq = 0; if (q->mq_ops) { hctx = q->mq_ops->map_queue(q, rq->mq_ctx->cpu); hwq = hctx->queue_num; } return (hwq << BLK_MQ_UNIQUE_TAG_BITS) | (rq->tag & BLK_MQ_UNIQUE_TAG_MASK); } EXPORT_SYMBOL(blk_mq_unique_tag); ssize_t blk_mq_tag_sysfs_show(struct blk_mq_tags *tags, char *page) { char *orig_page = page; Loading Loading
Documentation/block/biodoc.txt +0 −4 Original line number Diff line number Diff line Loading @@ -827,10 +827,6 @@ but in the event of any barrier requests in the tag queue we need to ensure that requests are restarted in the order they were queue. This may happen if the driver needs to use blk_queue_invalidate_tags(). Tagging also defines a new request flag, REQ_QUEUED. This is set whenever a request is currently tagged. You should not use this flag directly, blk_rq_tagged(rq) is the portable way to do so. 3.3 I/O Submission The routine submit_bio() is used to submit a single io. Higher level i/o Loading
Documentation/scsi/scsi_mid_low_api.txt +5 −45 Original line number Diff line number Diff line Loading @@ -271,9 +271,9 @@ init_this_scsi_driver() ----+ slave_destroy() *** ------------------------------------------------------------ The mid level invokes scsi_adjust_queue_depth() with tagged queuing off and "cmd_per_lun" for that host as the queue length. These settings can be overridden by a slave_configure() supplied by the LLD. The mid level invokes scsi_adjust_queue_depth() with "cmd_per_lun" for that host as the queue length. These settings can be overridden by a slave_configure() supplied by the LLD. *** For scsi devices that the mid level tries to scan but do not respond, a slave_alloc(), slave_destroy() pair is called. Loading Loading @@ -366,13 +366,11 @@ is initialized. The functions below are listed alphabetically and their names all start with "scsi_". Summary: scsi_activate_tcq - turn on tag command queueing scsi_add_device - creates new scsi device (lu) instance scsi_add_host - perform sysfs registration and set up transport class scsi_adjust_queue_depth - change the queue depth on a SCSI device scsi_bios_ptable - return copy of block device's partition table scsi_block_requests - prevent further commands being queued to given host scsi_deactivate_tcq - turn off tag command queueing scsi_host_alloc - return a new scsi_host instance whose refcount==1 scsi_host_get - increments Scsi_Host instance's refcount scsi_host_put - decrements Scsi_Host instance's refcount (free if 0) Loading @@ -389,24 +387,6 @@ Summary: Details: /** * scsi_activate_tcq - turn on tag command queueing ("ordered" task attribute) * @sdev: device to turn on TCQ for * @depth: queue depth * * Returns nothing * * Might block: no * * Notes: Eventually, it is hoped depth would be the maximum depth * the device could cope with and the real queue depth * would be adjustable from 0 to depth. * * Defined (inline) in: include/scsi/scsi_tcq.h **/ void scsi_activate_tcq(struct scsi_device *sdev, int depth) /** * scsi_add_device - creates new scsi device (lu) instance * @shost: pointer to scsi host instance Loading Loading @@ -458,9 +438,6 @@ int scsi_add_host(struct Scsi_Host *shost, struct device * dev) /** * scsi_adjust_queue_depth - allow LLD to change queue depth on a SCSI device * @sdev: pointer to SCSI device to change queue depth on * @tagged: 0 - no tagged queuing * MSG_SIMPLE_TAG - simple tagged queuing * MSG_ORDERED_TAG - ordered tagged queuing * @tags Number of tags allowed if tagged queuing enabled, * or number of commands the LLD can queue up * in non-tagged mode (as per cmd_per_lun). Loading @@ -471,15 +448,12 @@ int scsi_add_host(struct Scsi_Host *shost, struct device * dev) * * Notes: Can be invoked any time on a SCSI device controlled by this * LLD. [Specifically during and after slave_configure() and prior to * slave_destroy().] Can safely be invoked from interrupt code. Actual * queue depth change may be delayed until the next command is being * processed. See also scsi_activate_tcq() and scsi_deactivate_tcq(). * slave_destroy().] Can safely be invoked from interrupt code. * * Defined in: drivers/scsi/scsi.c [see source code for more notes] * **/ void scsi_adjust_queue_depth(struct scsi_device * sdev, int tagged, int tags) void scsi_adjust_queue_depth(struct scsi_device *sdev, int tags) /** Loading Loading @@ -514,20 +488,6 @@ unsigned char *scsi_bios_ptable(struct block_device *dev) void scsi_block_requests(struct Scsi_Host * shost) /** * scsi_deactivate_tcq - turn off tag command queueing * @sdev: device to turn off TCQ for * @depth: queue depth (stored in sdev) * * Returns nothing * * Might block: no * * Defined (inline) in: include/scsi/scsi_tcq.h **/ void scsi_deactivate_tcq(struct scsi_device *sdev, int depth) /** * scsi_host_alloc - create a scsi host adapter instance and perform basic * initialization. Loading
Documentation/scsi/st.txt +5 −3 Original line number Diff line number Diff line Loading @@ -506,9 +506,11 @@ user does not request data that far.) DEBUGGING HINTS To enable debugging messages, edit st.c and #define DEBUG 1. As seen above, debugging can be switched off with an ioctl if debugging is compiled into the driver. The debugging output is not voluminous. Debugging code is now compiled in by default but debugging is turned off with the kernel module parameter debug_flag defaulting to 0. Debugging can still be switched on and off with an ioctl. To enable debug at module load time add debug_flag=1 to the module load options, the debugging output is not voluminous. If the tape seems to hang, I would be very interested to hear where the driver is waiting. With the command 'ps -l' you can see the state Loading
block/blk-core.c +2 −2 Original line number Diff line number Diff line Loading @@ -1266,7 +1266,7 @@ void blk_requeue_request(struct request_queue *q, struct request *rq) blk_clear_rq_complete(rq); trace_block_rq_requeue(q, rq); if (blk_rq_tagged(rq)) if (rq->cmd_flags & REQ_QUEUED) blk_queue_end_tag(q, rq); BUG_ON(blk_queued_rq(rq)); Loading Loading @@ -2554,7 +2554,7 @@ EXPORT_SYMBOL_GPL(blk_unprep_request); */ void blk_finish_request(struct request *req, int error) { if (blk_rq_tagged(req)) if (req->cmd_flags & REQ_QUEUED) blk_queue_end_tag(req->q, req); BUG_ON(blk_queued_rq(req)); Loading
block/blk-mq-tag.c +28 −0 Original line number Diff line number Diff line Loading @@ -584,6 +584,34 @@ int blk_mq_tag_update_depth(struct blk_mq_tags *tags, unsigned int tdepth) return 0; } /** * blk_mq_unique_tag() - return a tag that is unique queue-wide * @rq: request for which to compute a unique tag * * The tag field in struct request is unique per hardware queue but not over * all hardware queues. Hence this function that returns a tag with the * hardware context index in the upper bits and the per hardware queue tag in * the lower bits. * * Note: When called for a request that is queued on a non-multiqueue request * queue, the hardware context index is set to zero. */ u32 blk_mq_unique_tag(struct request *rq) { struct request_queue *q = rq->q; struct blk_mq_hw_ctx *hctx; int hwq = 0; if (q->mq_ops) { hctx = q->mq_ops->map_queue(q, rq->mq_ctx->cpu); hwq = hctx->queue_num; } return (hwq << BLK_MQ_UNIQUE_TAG_BITS) | (rq->tag & BLK_MQ_UNIQUE_TAG_MASK); } EXPORT_SYMBOL(blk_mq_unique_tag); ssize_t blk_mq_tag_sysfs_show(struct blk_mq_tags *tags, char *page) { char *orig_page = page; Loading