| Function report | 
| Source Code: fs\buffer.c | Create Date:2022-07-28 20:14:08 | 
| Last Modify:2020-03-18 10:38:29 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Create the appropriate buffers when given a page for data area and* the size of each buffer
Proto:struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size, bool retry)
Type:struct buffer_head
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct page * | page | |
| unsigned long | size | |
| bool | retry | 
| 858 | gfp = GFP_NOFS | __GFP_ACCOUNT | 
| 862 | If retry Then gfp |= __GFP_NOFAIL | 
| 868 | head = NULL | 
| 871 | bh = alloc_buffer_head(gfp) | 
| 876 | start block number = -1 | 
| 879 | size of mapping = size | 
| 882 | set_bh_page(bh, page, offset) | 
| 884 | out : | 
| 886 | mem_cgroup_put(memcg) | 
| 887 | Return head | 
| 891 | no_grow : | 
| 892 | If head Then | 
| 893 | Do | 
| 900 | Go to out | 
| Name | Describe | 
|---|---|
| grow_dev_page | Create the page-cache page that contains the requested block.* This is used purely for blockdev mappings. | 
| create_empty_buffers | We attach and possibly dirty the buffers atomically wrt* __set_page_dirty_buffers() via private_lock. try_to_free_buffers* is already excluded via the page lock. | 
| nobh_write_begin | On entry, the page is fully not uptodate.* On exit the page is fully uptodate in the areas outside (from,to)* The filesystem needs to handle block truncation upon failure. | 
| 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 |