'\" t .\" Title: blk_rq_map_user_iov .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Block Devices .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "BLK_RQ_MAP_USER_IOV" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "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_rq_map_user_iov \- map user data to a request, for REQ_TYPE_BLOCK_PC usage .SH "SYNOPSIS" .HP \w'int\ blk_rq_map_user_iov('u .BI "int blk_rq_map_user_iov(struct\ request_queue\ *\ " "q" ", struct\ request\ *\ " "rq" ", struct\ rq_map_data\ *\ " "map_data" ", const\ struct\ iov_iter\ *\ " "iter" ", gfp_t\ " "gfp_mask" ");" .SH "ARGUMENTS" .PP \fIq\fR .RS 4 request queue where request should be inserted .RE .PP \fIrq\fR .RS 4 request to map data to .RE .PP \fImap_data\fR .RS 4 pointer to the rq_map_data holding pages (if necessary) .RE .PP \fIiter\fR .RS 4 iovec iterator .RE .PP \fIgfp_mask\fR .RS 4 memory allocation flags .RE .SH "DESCRIPTION" .PP Data will be mapped directly for zero copy I/O, if possible\&. Otherwise a kernel bounce buffer is used\&. .PP A matching \fBblk_rq_unmap_user\fR must be issued at the end of I/O, while still in process context\&. .SH "NOTE" .PP The mapped bio may need to be bounced through \fBblk_queue_bounce\fR before being submitted to the device, as pages mapped may be out of reach\&. It\*(Aqs the callers responsibility to make sure this happens\&. The original bio must be passed back in to \fBblk_rq_unmap_user\fR for proper unmapping\&. .SH "COPYRIGHT" .br