Skip to contentSkip to conversation

2.5.x why a conditional call to blkdev_dequeue_request?

DISCUSSION Patrick Mansfield 2 participants 2 messages Apr 8, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

Why do we conditionally call blkdev_dequeue_request, and yet run the same code even if a request is not dequeued?

Should we always call blkdev_dequeue_request, and handle blk_queue_start_tag() returning != 0 as a bug or a resource limitation?

In 2.5 scsi_lib.c scsi_request_fn right now we have:

	if (!(blk_queue_tagged(q) && (blk_queue_start_tag(q, req) == 0)))
		blkdev_dequeue_request(req);

	/* then handle the request whether it was dequeued or not */

-- Patrick Mansfield

#1 lore raw
Quoted 6 lines · Patrick Mansfield

Why do we conditionally call blkdev_dequeue_request, and yet run the same code even if a request is not dequeued?

Should we always call blkdev_dequeue_request, and handle blk_queue_start_tag() returning != 0 as a bug or a resource limitation?

Quoted 7 lines

In 2.5 scsi_lib.c scsi_request_fn right now we have:

	if (!(blk_queue_tagged(q) && (blk_queue_start_tag(q, req) == 0)))
		blkdev_dequeue_request(req);

	/* then handle the request whether it was dequeued or not */

blk_queue_start_tag dequeues for you. It's for IDE and other block code where the request is left in the queue while being processed. In SCSI we dequeue regardless of whether we're tagged or not.

James