blk_rq_map_user_iov
Prev | Chapter 19. Block Devices | Next

## Name

blk_rq_map_user_iov — map user data to a request, for REQ_BLOCK_PC usage

## Synopsis

`int blk_rq_map_user_iov (` | struct request_queue * | q,
| struct request * | rq,
| struct sg_iovec * | iov,
| int | iov_count,
| unsigned int | len`)`;

## Arguments

`q`

  request queue where request should be inserted

`rq`

  request to map data to

`iov`

  pointer to the iovec

`iov_count`

  number of elements in the iovec

`len`

  I/O byte count

## Description

Data will be mapped directly for zero copy io, if possible. Otherwise a kernel bounce buffer is used.

A matching `blk_rq_unmap_user` must be issued at the end of io, while still in process context.

## Note

The mapped bio may need to be bounced through `blk_queue_bounce` before being submitted to the device, as pages mapped may be out of reach. It's the callers responsibility to make sure this happens. The original bio must be passed back in to `blk_rq_unmap_user` for proper unmapping.

Prev | Up | Next
blk_rq_map_user | Home | blk_rq_unmap_user