blk_queue_make_request — define an alternate make_request function for a device
voidblk_queue_make_request( | struct request_queue *q, |
make_request_fn *mfn); |
struct request_queue * qthe request queue for the device to be affected
make_request_fn * mfnthe alternate make_request function
The normal way forstruct 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 toblk_queue_make_request.
Caveat: The driver that does this *must* be able to deal appropriately with buffers in“highmemory”. This can be accomplished by either calling__bio_kmap_atomic to get a temporary kernel mapping, or by callingblk_queue_bounce to create a buffer in normal memory.