1BLK_INSERT_REQUEST(9) Block Devices BLK_INSERT_REQUEST(9)
2
3
4
6 blk_insert_request - insert a special request into a request queue
7
9 void blk_insert_request(struct request_queue * q, struct request * rq,
10 int at_head, void * data);
11
13 q
14 request queue where request should be inserted
15
16 rq
17 request to be inserted
18
19 at_head
20 insert request at head or tail of queue
21
22 data
23 private data
24
26 Many block devices need to execute commands asynchronously, so they
27 don't block the whole kernel from preemption during request execution.
28 This is accomplished normally by inserting aritficial requests tagged
29 as REQ_TYPE_SPECIAL in to the corresponding request queue, and letting
30 them be scheduled for actual execution by the request queue.
31
32 We have the option of inserting the head or the tail of the queue.
33 Typically we use the tail for new ioctls and so forth. We use the head
34 of the queue for things like a QUEUE_FULL message from a device, or a
35 host that is unable to accept a particular command.
36
38Kernel Hackers Manual 2.6. November 2011 BLK_INSERT_REQUEST(9)