---
name: "bio_split"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/bio_split"
---

# bio\_split(9)

split a bio

## NAME

bio\_split - split a bio

## SYNOPSIS

**struct bio \* bio\_split(struct bio \*** *bio***, int** *sectors***, gfp\_t** *gfp***, struct bio\_set \*** *bs***);**

## ARGUMENTS

*bio*

bio to split

*sectors*

number of sectors to split from the front of *bio*

*gfp*

gfp mask

*bs*

bio set to allocate from

## DESCRIPTION

Allocates and returns a new bio which represents *sectors* from the start of *bio*, and updates *bio* to represent the remaining sectors.

Unless this is a discard request the newly allocated bio will point to *bio*'s bi\_io\_vec; it is the caller's responsibility to ensure that *bio* is not freed before the split.

## COPYRIGHT
