Function report |
Source Code:block\bio.c |
Create Date:2022-07-28 16:56:00 |
| Last Modify:2020-03-17 23:13:58 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:_map_user_iov - map user iovec into bio*@q: the struct request_queue for the bio*@iter: iovec iterator*@gfp_mask: memory allocation flags* Map the user space address into a bio suitable for io to a block* device. Returns an error pointer in case of error.
Proto:struct bio *bio_map_user_iov(struct request_queue *q, struct iov_iter *iter, gfp_t gfp_mask)
Type:struct bio
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct request_queue * | q | |
| struct iov_iter * | iter | |
| gfp_t | gfp_mask |
| 1398 | If Not iov_iter_count(iter) Then Return ERR_PTR( - EINVAL) |
| 1401 | bio = bio_kmalloc(gfp_mask, iov_iter_npages(iter, BIO_MAX_PAGES)) |
| 1405 | When iov_iter_count(iter) cycle |
| 1408 | added = 0 |
| 1412 | If Value for the false possibility is greater at compile time(bytes <= 0) Then |
| 1417 | npages = DIV_ROUND_UP(offs + bytes, PAGE_SIZE) |
| 1422 | Else |
| 1426 | bool same_page = false |
| 1433 | If same_page Then Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page. |
| 1435 | Break |
| 1440 | offs = 0 |
| 1442 | iov_iter_advance(iter, added) |
| 1451 | If bytes Then Break |
| 1455 | bio_set_flag(bio, BIO_USER_MAPPED) |
| 1464 | Return bio |
| 1466 | out_unmap : |
| 1467 | bio_release_pages(bio, false) |
| Name | Describe |
|---|---|
| __blk_rq_map_user_iov |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |