---
name: "blk_queue_merge_bvec"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/blk_queue_merge_bvec"
---

# blk\_queue\_merge\_bvec(9)

set a merge\_bvec function for queue

## NAME

blk\_queue\_merge\_bvec - set a merge\_bvec function for queue

## SYNOPSIS

**void blk\_queue\_merge\_bvec(struct request\_queue \*** *q***, merge\_bvec\_fn \*** *mbfn***);**

## ARGUMENTS

*q*

queue

*mbfn*

merge\_bvec\_fn

## DESCRIPTION

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 **bio\_split** 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.

## COPYRIGHT
