1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>blk_queue_merge_bvec</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Linux Kernel API"><link rel="up" href="blkdev.html" title="Chapter 14. Block Devices"><link rel="prev" href="API-blk-queue-unprep-rq.html" title="blk_queue_unprep_rq"><link rel="next" href="API-blk-set-default-limits.html" title="blk_set_default_limits"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">blk_queue_merge_bvec</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-blk-queue-unprep-rq.html">Prev</a> </td><th width="60%" align="center">Chapter 14. Block Devices</th><td width="20%" align="right"> <a accesskey="n" href="API-blk-set-default-limits.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-blk-queue-merge-bvec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>blk_queue_merge_bvec — 2 set a merge_bvec function for queue 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">blk_queue_merge_bvec </b>(</code></td><td>struct request_queue * <var class="pdparam">q</var>, </td></tr><tr><td> </td><td>merge_bvec_fn * <var class="pdparam">mbfn</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1128357972"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>q</code></em></span></dt><dd><p> 4 queue 5 </p></dd><dt><span class="term"><em class="parameter"><code>mbfn</code></em></span></dt><dd><p> 6 merge_bvec_fn 7 </p></dd></dl></div></div><div class="refsect1"><a name="idp1128360572"></a><h2>Description</h2><p> 8 Usually queues have static limitations on the max sectors or segments that 9 we can put in a request. Stacking drivers may have some settings that 10 are dynamic, and thus we have to query the queue whether it is ok to 11 add a new bio_vec to a bio at a given offset or not. If the block device 12 has such limitations, it needs to register a merge_bvec_fn to control 13 the size of bio's sent to it. Note that a block device *must* allow a 14 single page to be added to an empty bio. The block device driver may want 15 to use the <code class="function">bio_split</code> function to deal with these bio's. By default 16 no merge_bvec_fn is defined for a queue, and only the fixed limits are 17 honored. 18</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-blk-queue-unprep-rq.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="blkdev.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-blk-set-default-limits.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">blk_queue_unprep_rq</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">blk_set_default_limits</span></td></tr></table></div></body></html> 19