'\" t .\" Title: blk_queue_merge_bvec .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Block Devices .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "BLK_QUEUE_MERGE_BVEC" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "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_merge_bvec \- set a merge_bvec function for queue .SH "SYNOPSIS" .HP \w'void\ blk_queue_merge_bvec('u .BI "void blk_queue_merge_bvec(struct\ request_queue\ *\ " "q" ", merge_bvec_fn\ *\ " "mbfn" ");" .SH "ARGUMENTS" .PP \fIq\fR .RS 4 queue .RE .PP \fImbfn\fR .RS 4 merge_bvec_fn .RE .SH "DESCRIPTION" .PP 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\*(Aqs 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 \fBbio_split\fR function to deal with these bio\*(Aqs\&. By default no merge_bvec_fn is defined for a queue, and only the fixed limits are honored\&. .SH "COPYRIGHT" .br