<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <HTML ><HEAD ><TITLE >blk_queue_make_request</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="The Linux Kernel API" HREF="book1.html"><LINK REL="UP" TITLE="Block Devices" HREF="c11504.html"><LINK REL="PREVIOUS" TITLE="blk_queue_headactive" HREF="r11537.html"><LINK REL="NEXT" TITLE="blk_init_queue" HREF="r11616.html"></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >The Linux Kernel API</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="r11537.html" ACCESSKEY="P" ><<< Previous</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="r11616.html" ACCESSKEY="N" >Next >>></A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="AEN11576" ></A ><SPAN CLASS="phrase" ><SPAN CLASS="PHRASE" >blk_queue_make_request</SPAN ></SPAN ></H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN11580" ></A ><H2 >Name</H2 >blk_queue_make_request -- define an alternate make_request function for a device </DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN11583" ></A ><H2 >Synopsis</H2 ><DIV CLASS="FUNCSYNOPSIS" ><A NAME="AEN11585" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >void <TT CLASS="FUNCTION" >blk_queue_make_request </TT ></CODE >(request_queue_t * <TT CLASS="PARAMETER" ><I >q</I ></TT >, make_request_fn * <TT CLASS="PARAMETER" ><I >mfn</I ></TT >);</CODE ></P ><P ></P ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN11593" ></A ><H2 >Arguments</H2 ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT ><TT CLASS="PARAMETER" ><I >q</I ></TT ></DT ><DD ><P > the request queue for the device to be affected </P ></DD ><DT ><TT CLASS="PARAMETER" ><I >mfn</I ></TT ></DT ><DD ><P > the alternate make_request function </P ></DD ></DL ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN11606" ></A ><H2 >Description</H2 ><P > The normal way for &struct buffer_heads 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 <TT CLASS="FUNCTION" >blk_queue_make_request</TT >. </P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN11610" ></A ><H2 >Caveat</H2 ><P > The driver that does this *must* be able to deal appropriately with buffers in <SPAN CLASS="QUOTE" >"highmemory"</SPAN >, either by calling <TT CLASS="FUNCTION" >bh_kmap</TT > to get a kernel mapping, to by calling <TT CLASS="FUNCTION" >create_bounce</TT > to create a buffer in normal memory. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="r11537.html" ACCESSKEY="P" ><<< Previous</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="book1.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="r11616.html" ACCESSKEY="N" >Next >>></A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><SPAN CLASS="phrase" ><SPAN CLASS="PHRASE" >blk_queue_headactive</SPAN ></SPAN ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="c11504.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><SPAN CLASS="phrase" ><SPAN CLASS="PHRASE" >blk_init_queue</SPAN ></SPAN ></TD ></TR ></TABLE ></DIV ></BODY ></HTML >