---
name: "blk_insert_request"
section: "9"
platform: "linux"
package: "linux-manual-3.2"
version: "3.2.78-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/blk_insert_request"
---

# blk\_insert\_request(9)

insert a special request into a request queue

## NAME

blk\_insert\_request - insert a special request into a request queue

## SYNOPSIS

**void blk\_insert\_request(struct request\_queue \*** *q***, struct request \*** *rq***, int** *at\_head***, void \*** *data***);**

## ARGUMENTS

*q*

request queue where request should be inserted

*rq*

request to be inserted

*at\_head*

insert request at head or tail of queue

*data*

private data

## DESCRIPTION

Many block devices need to execute commands asynchronously, so they don't block the whole kernel from preemption during request execution. This is accomplished normally by inserting aritficial requests tagged as REQ\_TYPE\_SPECIAL in to the corresponding request queue, and letting them be scheduled for actual execution by the request queue.

We have the option of inserting the head or the tail of the queue. Typically we use the tail for new ioctls and so forth. We use the head of the queue for things like a QUEUE\_FULL message from a device, or a host that is unable to accept a particular command.

## COPYRIGHT
