Function report |
Source Code:mm\page-writeback.c |
Create Date:2022-07-28 14:11:00 |
| Last Modify:2022-05-23 13:25:58 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:write_cache_pages - walk the list of dirty pages of the given address space and write all of them
Proto:int write_cache_pages(struct address_space *mapping, struct writeback_control *wbc, writepage_t writepage, void *data)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct address_space * | mapping | |
| struct writeback_control * | wbc | |
| writepage_t | writepage | |
| void * | data |
| 2162 | ret = 0 |
| 2163 | done = 0 |
| 2167 | writeback_index = writeback_index |
| 2171 | range_whole = 0 |
| 2174 | pagevec_init( & pvec) |
| 2175 | If ange_start is cyclic Then |
| 2179 | Else |
| 2181 | end = range_end >> PAGE_SHIFT determines the page size |
| 2185 | If sync_mode == WB_SYNC_ALL || ag-and-write to avoid livelock Then tag = PAGECACHE_TAG_TOWRITE |
| 2191 | done_index = index |
| 2197 | If nr_pages == 0 Then Break |
| 2216 | continue_unlock : |
| 2218 | Continue |
| 2223 | Go to continue_unlock |
| 2227 | If sync_mode != WB_SYNC_NONE Then Wait for a page to complete writeback |
| 2229 | Else Go to continue_unlock |
| 2233 | BUG_ON(Only test-and-set exist for PG_writeback. The unconditional operators are* risky: they bypass page accounting.) |
| 2237 | trace_wbc_writepage(wbc, inode_to_bdi(host)) |
| 2252 | If error == AOP_WRITEPAGE_ACTIVATE Then |
| 2254 | error = 0 |
| 2255 | Else if sync_mode != WB_SYNC_ALL Then |
| 2271 | If --Write this many pages, and decrementthis for each page written <= 0 && sync_mode == WB_SYNC_NONE Then |
| 2273 | done = 1 |
| 2274 | Break |
| 2277 | pagevec_release( & pvec) |
| 2278 | cond_resched() |
| 2286 | If ange_start is cyclic && Not done Then done_index = 0 |
| 2288 | If ange_start is cyclic || range_whole && Write this many pages, and decrementthis for each page written > 0 Then writeback_index = done_index |
| 2291 | Return ret |
| Name | Describe |
|---|---|
| generic_writepages | generic_writepages - walk the list of dirty pages of the given address space and writepage() all of them |
| iomap_writepages |
| 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 |