1BLK_RQ_MAP_USER(9)               Block Devices              BLK_RQ_MAP_USER(9)
2
3
4

NAME

6       blk_rq_map_user - map user data to a request, for REQ_TYPE_BLOCK_PC
7       usage
8

SYNOPSIS

10       int blk_rq_map_user(struct request_queue * q, struct request * rq,
11                           struct rq_map_data * map_data, void __user * ubuf,
12                           unsigned long len, gfp_t gfp_mask);
13

ARGUMENTS

15       q
16           request queue where request should be inserted
17
18       rq
19           request structure to fill
20
21       map_data
22           pointer to the rq_map_data holding pages (if necessary)
23
24       ubuf
25           the user buffer
26
27       len
28           length of user data
29
30       gfp_mask
31           memory allocation flags
32

DESCRIPTION

34       Data will be mapped directly for zero copy I/O, if possible. Otherwise
35       a kernel bounce buffer is used.
36
37       A matching blk_rq_unmap_user must be issued at the end of I/O, while
38       still in process context.
39

NOTE

41       The mapped bio may need to be bounced through blk_queue_bounce before
42       being submitted to the device, as pages mapped may be out of reach.
43       It's the callers responsibility to make sure this happens. The original
44       bio must be passed back in to blk_rq_unmap_user for proper unmapping.
45
47Kernel Hackers Manual 2.6.       November 2011              BLK_RQ_MAP_USER(9)
Impressum