'\" t .\" Title: blk_queue_make_request .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Block Devices .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "BLK_QUEUE_MAKE_REQUE" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Block Devices" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" blk_queue_make_request \- define an alternate make_request function for a device .SH "SYNOPSIS" .HP \w'void\ blk_queue_make_request('u .BI "void blk_queue_make_request(struct\ request_queue\ *\ " "q" ", make_request_fn\ *\ " "mfn" ");" .SH "ARGUMENTS" .PP \fIq\fR .RS 4 the request queue for the device to be affected .RE .PP \fImfn\fR .RS 4 the alternate make_request function .RE .SH "DESCRIPTION" .PP The normal way for struct bios to be passed to a device driver is for them to be collected into requests on a request queue, and then to allow the device driver to select requests off that queue when it is ready\&. This works well for many block devices\&. However some block devices (typically virtual devices such as md or lvm) do not benefit from the processing on the request queue, and are served best by having the requests passed directly to them\&. This can be achieved by providing a function to \fBblk_queue_make_request\fR\&. .PP Caveat: The driver that does this *must* be able to deal appropriately with buffers in \(lqhighmemory\(rq\&. This can be accomplished by either calling \fB__bio_kmap_atomic\fR to get a temporary kernel mapping, or by calling \fBblk_queue_bounce\fR to create a buffer in normal memory\&. .SH "COPYRIGHT" .br