Function report |
Source Code:fs\fs-writeback.c |
Create Date:2022-07-28 20:10:50 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Write a portion of b_io inodes which belong to @sb.* Return the number of pages and/or inodes written.* NOTE! This is called with wb->list_lock held, and will* unlock and relock that for each inode it ends up doing* IO for.
Proto:static long writeback_sb_inodes(struct super_block *sb, struct bdi_writeback *wb, struct wb_writeback_work *work)
Type:long
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct super_block * | sb | |
| struct bdi_writeback * | wb | |
| struct wb_writeback_work * | work |
| 1638 | start_time = jiffies |
| 1640 | wrote = 0 |
| 1647 | If sb Then |
| 1662 | Break |
| 1670 | spin_lock( & _blocks, i_bytes, maybe i_size ) |
| 1672 | spin_unlock( & _blocks, i_bytes, maybe i_size ) |
| 1674 | Continue |
| 1676 | If Misc & Writeback of inode is running && sync_mode != Wait on every mapping Then |
| 1686 | spin_unlock( & _blocks, i_bytes, maybe i_size ) |
| 1689 | Continue |
| 1691 | spin_unlock( & protects the b_* lists ) |
| 1698 | If Misc & Writeback of inode is running Then |
| 1702 | spin_lock( & protects the b_* lists ) |
| 1703 | Continue |
| 1705 | Misc |= Writeback of inode is running |
| 1706 | wbc_attach_and_unlock_inode( & wbc, inode) |
| 1708 | write_chunk = writeback_chunk_size(wb, work) |
| 1710 | Pages which were not written = 0 |
| 1718 | wbc_detach_inode( & wbc) |
| 1722 | If need_resched() Then |
| 1732 | cond_resched() |
| 1739 | tmp_wb = inode_to_wb_and_lock_list(inode) |
| 1740 | spin_lock( & _blocks, i_bytes, maybe i_size ) |
| 1741 | If Not (Misc & I_DIRTY_ALL) Then wrote++ |
| 1744 | inode_sync_complete(inode) |
| 1745 | spin_unlock( & _blocks, i_bytes, maybe i_size ) |
| 1747 | If Value for the false possibility is greater at compile time(tmp_wb != wb) Then |
| 1748 | spin_unlock( & protects the b_* lists ) |
| 1749 | spin_lock( & protects the b_* lists ) |
| 1756 | If wrote Then |
| 1757 | If ime_is_before_jiffies(a) return true if a is before jiffies (start_time + HZ / 10UL) Then Break |
| 1759 | If nr_pages <= 0 Then Break |
| 1763 | Return wrote |
| Name | Describe |
|---|---|
| __writeback_inodes_wb | |
| wb_writeback | Explicit flushing or periodic writeback of "old" data |
| 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 |