blk_queue_headactive

Name

blk_queue_headactive --  indicate whether head of request queue may be active

Synopsis

void blk_queue_headactive (request_queue_t * q, int active);

Arguments

q

The queue which this applies to.

active

A flag indication where the head of the queue is active.

Description

The driver for a block device may choose to leave the currently active request on the request queue, removing it only when it has completed. The queue handling routines assume this by default for safety reasons and will not involve the head of the request queue in any merging or reordering of requests when the queue is unplugged (and thus may be working on this particular request).

If a driver removes requests from the queue before processing them, then it may indicate that it does so, there by allowing the head of the queue to be involved in merging and reordering. This is done be calling blk_queue_headactive with an active flag of 0.

If a driver processes several requests at once, it must remove them (or at least all but one of them) from the request queue.

When a queue is plugged the head will be assumed to be inactive.