Function report |
Source Code:fs\iomap\swapfile.c |
Create Date:2022-07-28 20:32:27 |
Last Modify:2020-03-18 11:03:10 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Collect physical extents for this swap file. Physical extents reported to* the swap code must be trimmed to align to a page boundary. The logical* offset within the file is irrelevant since the swapfile code maps logical
Proto:static int iomap_swapfile_add_extent(struct iomap_swapfile_info *isi)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct iomap_swapfile_info * | isi |
31 | iomap = accumulated iomap |
42 | first_ppage = @a is a power of 2 value ( disk offset of mapping, bytes , PAGE_SIZE) >> PAGE_SHIFT determines the page size |
43 | next_ppage = ALIGN_DOWN( disk offset of mapping, bytes + length of mapping, bytes , PAGE_SIZE) >> PAGE_SHIFT determines the page size |
47 | If first_ppage >= next_ppage Then Return 0 |
49 | nr_pages = next_ppage - first_ppage |
57 | If file offset of mapping, bytes == 0 Then first_ppage_reported++ |
59 | If lowest physical addr seen (pages) > first_ppage_reported Then lowest physical addr seen (pages) = first_ppage_reported |
61 | If highest physical addr seen (pages) < next_ppage - 1 Then highest physical addr seen (pages) = next_ppage - 1 |
65 | error = Add a block range (and the corresponding page range) into this swapdev's* extent tree.* This function rather assumes that it is called in ascending page order. |
68 | xtent count += error |
70 | Return 0 |
Name | Describe |
---|---|
iomap_swapfile_activate_actor | Accumulate iomaps for this swap file. We have to accumulate iomaps because* swap only cares about contiguous page-aligned physical extents and makes no* distinction between written and unwritten extents. |
iomap_swapfile_activate | Iterate a swap file's iomaps to construct physical extents that can be* passed to the swapfile subsystem. |
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 |