<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><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><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 id="API-blk-queue-merge-bvec"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>blk_queue_merge_bvec — set a merge_bvec function for queue </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 <strong class="fsfunc">blk_queue_merge_bvec </strong>(</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 id="idm139749891727136"></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> queue </p></dd><dt><span class="term"><em class="parameter"><code>mbfn</code></em></span></dt><dd><p> merge_bvec_fn </p></dd></dl></div></div><div class="refsect1"><a id="idm139749891722016"></a><h2>Description</h2><p> Usually queues have static limitations on the max sectors or segments that we can put in a request. Stacking drivers may have some settings that are dynamic, and thus we have to query the queue whether it is ok to add a new bio_vec to a bio at a given offset or not. If the block device has such limitations, it needs to register a merge_bvec_fn to control the size of bio's sent to it. Note that a block device *must* allow a single page to be added to an empty bio. The block device driver may want to use the <code class="function">bio_split</code> function to deal with these bio's. By default no merge_bvec_fn is defined for a queue, and only the fixed limits are honored. </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>