Function report |
Source Code:lib\scatterlist.c |
Create Date:2022-07-28 06:20:44 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__sg_alloc_table_from_pages - Allocate and initialize an sg table from* an array of pages*@sgt: The sg table header to use*@pages: Pointer to an array of page pointers*@n_pages: Number of pages in the pages array*@offset: Offset from start of the first
Proto:int __sg_alloc_table_from_pages(struct sg_table *sgt, struct page **pages, unsigned int n_pages, unsigned int offset, unsigned long size, unsigned int max_segment, gfp_t gfp_mask)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct sg_table * | sgt | |
struct page ** | pages | |
unsigned int | n_pages | |
unsigned int | offset | |
unsigned long | size | |
unsigned int | max_segment | |
gfp_t | gfp_mask |
398 | If WARN_ON(!max_segment || offset_in_page(max_segment)) Then Return -EINVAL |
402 | chunks = 1 |
403 | seg_len = 0 |
406 | If seg_len >= max_segment || page_to_pfn(pages[i]) != page_to_pfn(pages[i - 1]) + 1 Then |
414 | If Value for the false possibility is greater at compile time(ret) Then Return ret |
418 | cur_page = 0 |
423 | seg_len = 0 |
426 | If seg_len >= max_segment || page_to_pfn(pages[j]) != page_to_pfn(pages[j - 1]) + 1 Then Break |
432 | chunk_size = ( j - cur_page << PAGE_SHIFT determines the page size ) - offset |
435 | size -= chunk_size |
436 | offset = 0 |
440 | Return 0 |
Name | Describe |
---|---|
sg_alloc_table_from_pages | sg_alloc_table_from_pages - Allocate and initialize an sg table from* an array of pages*@sgt: The sg table header to use*@pages: Pointer to an array of page pointers*@n_pages: Number of pages in the pages array*@offset: Offset from start of the first page |
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 |