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:An autonomous function to put a chunk of a page under deferred IO.* The caller doesn't actually know (or care) whether this piece of page is in* a BIO, or is under IO or whatever. We just take care of all possible * situations here
Proto:static inline int submit_page_section(struct dio *dio, struct dio_submit *sdio, struct page *page, unsigned offset, unsigned len, sector_t blocknr, struct buffer_head *map_bh)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct dio * | dio | |
struct dio_submit * | sdio | |
struct page * | page | |
unsigned | offset | |
unsigned | len | |
sector_t | blocknr | |
struct buffer_head * | map_bh |
831 | ret = 0 |
833 | If op == REQ_OP_WRITE Then |
837 | task_io_account_write(len) |
843 | If The page == page && Offset into it, in bytes + Nr of bytes at cur_page_offset == offset && Where it starts + (Nr of bytes at cur_page_offset >> doesn't change ) == blocknr Then |
848 | Go to out |
854 | If The page Then |
855 | ret = Put cur_page under IO |
857 | The page = NULL |
866 | Where it starts = blocknr |
868 | out : |
873 | If prev block is at a boundary Then |
874 | ret = Put cur_page under IO |
878 | The page = NULL |
880 | Return ret |
Name | Describe |
---|---|
dio_zero_block | If we are not writing the entire block and get_block() allocated* the block for us, we need to fill-in the unused portion of the* block with zeros |
do_direct_IO | 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 |
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 |