---
name: "bio_copy_user"
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/bio_copy_user"
---

# bio\_copy\_user(9)

copy user data to bio

## NAME

bio\_copy\_user - copy user data to bio

## SYNOPSIS

**struct bio \* bio\_copy\_user(struct request\_queue \*** *q***, struct rq\_map\_data \*** *map\_data***, unsigned long** *uaddr***, unsigned int** *len***, int** *write\_to\_vm***, gfp\_t** *gfp\_mask***);**

## ARGUMENTS

*q*

destination block queue

*map\_data*

pointer to the rq\_map\_data holding pages (if necessary)

*uaddr*

start of user address

*len*

length in bytes

*write\_to\_vm*

bool indicating writing to pages or not

*gfp\_mask*

memory allocation flags

## DESCRIPTION

Prepares and returns a bio for indirect user io, bouncing data to/from kernel pages as necessary. Must be paired with call **bio\_uncopy\_user** on io completion.

## COPYRIGHT
