Function report |
Source Code:fs\direct-io.c |
Create Date:2022-07-28 20:15:12 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Walk the user pages, and the file, mapping blocks to disk and generating* a sequence of (page,offset,len,block) mappings. These mappings are injected* into submit_page_section(), which takes care of the next stage of submission
Proto:static int do_direct_IO(struct dio *dio, struct dio_submit *sdio, struct buffer_head *map_bh)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct dio * | dio | |
| struct dio_submit * | sdio | |
| struct buffer_head * | map_bh |
| 946 | blkbits = doesn't change |
| 947 | i_blkbits = blkbits + When we're using an alignment whichis finer than the filesystem's softblocksize, this specifies how muchfiner. blkfactor=2 means 1/4-blockalignment. Does not change |
| 948 | ret = 0 |
| 959 | from = If xt page to process Then 0 Else from |
| 960 | to = If xt page to process == last valid page + 1 - 1 Then to Else PAGE_SIZE |
| 961 | xt page to process ++ |
| 968 | If At block_in_file. changes == 0 Then |
| 976 | If ret Then |
| 978 | Go to out |
| 980 | If Not buffer_mapped(map_bh) Then Go to do_holes |
| 987 | If buffer_new(map_bh) Then |
| 994 | If Not When we're using an alignment whichis finer than the filesystem's softblocksize, this specifies how muchfiner. blkfactor=2 means 1/4-blockalignment. Does not change Then Go to do_holes |
| 997 | blkmask = (1 << When we're using an alignment whichis finer than the filesystem's softblocksize, this specifies how muchfiner. blkfactor=2 means 1/4-blockalignment. Does not change ) - 1 |
| 1011 | If Not buffer_new(map_bh) Then xt block to be put under IO,in dio_blocks units += dio_remainder |
| 1015 | do_holes : |
| 1017 | If Not buffer_mapped(map_bh) Then |
| 1021 | If op == REQ_OP_WRITE Then |
| 1023 | Return -ENOTBLK |
| 1032 | If Current offset into the underlyingfile in dio_block units. >= i_size_aligned >> blkbits Then |
| 1036 | Go to out |
| 1042 | Go to next_block |
| 1059 | If this_chunk_blocks > u Then this_chunk_blocks = u |
| 1062 | If this_chunk_blocks > u Then this_chunk_blocks = u |
| 1064 | this_chunk_bytes = this_chunk_blocks << blkbits |
| 1065 | BUG_ON(this_chunk_bytes == 0) |
| 1067 | If this_chunk_blocks == At block_in_file. changes Then prev block is at a boundary = buffer_boundary(map_bh) |
| 1074 | If ret Then |
| 1076 | Go to out |
| 1081 | from += this_chunk_bytes |
| 1082 | IO result += this_chunk_bytes |
| 1084 | next_block : |
| 1086 | If Current offset into the underlyingfile in dio_block units. == doesn't change Then Break |
| 1093 | out : |
| 1094 | Return ret |
| Name | Describe |
|---|---|
| do_blockdev_direct_IO | This is a library function for use by filesystem drivers |
| 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 |