| Function report | 
| Source Code: fs\aio.c | Create Date:2022-07-28 20:21:12 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:aio_migratepage
Proto:static int aio_migratepage(struct address_space *mapping, struct page *new, struct page *old, enum migrate_mode mode)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct address_space * | mapping | |
| struct page * | new | |
| struct page * | old | |
| enum migrate_mode | mode | 
| 389 | If mode == MIGRATE_SYNC_NO_COPY Then Return -EINVAL | 
| 392 | rc = 0 | 
| 395 | spin_lock( & private_lock) | 
| 396 | ctx = private_data | 
| 397 | If Not ctx Then | 
| 414 | If ring_pages[idx] != old Then rc = -EAGAIN | 
| 419 | If rc != 0 Then Go to out_unlock | 
| 423 | BUG_ON(Only test-and-set exist for PG_writeback. The unconditional operators are* risky: they bypass page accounting.) | 
| 429 | Go to out_unlock | 
| 436 | spin_lock_irqsave( & completion_lock, flags) | 
| 437 | migrate_page_copy(new, old) | 
| 438 | BUG_ON(ring_pages[idx] != old) | 
| 439 | ring_pages[idx] = new | 
| 440 | spin_unlock_irqrestore( & completion_lock, flags) | 
| 445 | out_unlock : | 
| 447 | out : | 
| 448 | spin_unlock( & private_lock) | 
| 449 | Return rc | 
| 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 |