f2fs: give time to flush dirty pages for checkpoint
Subsystems (2)
Jaegeuk Kim
maintainerPATCH 1/3 f2fs: give time to flush dirty pages for checkpoint
If all the threads are waiting for checkpoint, we have no chance to flush required dirty pages.
Signed-off-by Jaegeuk Kim <[email protected]>
--- fs/f2fs/checkpoint.c | 3 +++ 1 file changed, 3 insertions(+)
fs/f2fs/checkpoint.c +3 -0
@@ -980,6 +980,7 @@ static int block_operations(struct f2fs_sb_info *sbi) err =sync_dirty_inodes (sbi,DIR_INODE );if (err) goto out; +cond_resched (); goto retry_flush_dents; }
@@ -995,6 +996,7 @@ static int block_operations(struct f2fs_sb_info *sbi) err =f2fs_sync_inode_meta (sbi);if (err) goto out; +cond_resched (); goto retry_flush_dents; }
@@ -1009,6 +1011,7 @@ static int block_operations(struct f2fs_sb_info *sbi)f2fs_unlock_all (sbi); goto out; } +cond_resched (); goto retry_flush_nodes; }
Signature · 1 line
2.11.0
Jaegeuk Kim
maintainerPATCH 2/3 f2fs: allocate hot_data for atomic writes
We'd better allocate atomic writes to hot_data zone.
Signed-off-by Jaegeuk Kim <[email protected]>
--- fs/f2fs/file.c | 1 + 1 file changed, 1 insertion(+)
fs/f2fs/file.c +1 -0
@@ -1531,6 +1531,7 @@ static int f2fs_ioc_start_atomic_write(struct file *filp) goto out;set_inode_flag (inode,FI_ATOMIC_FILE ); +set_inode_flag (inode,FI_HOT_DATA );f2fs_update_time (F2FS_I_SB (inode),REQ_TIME );if (!get_dirty_pages (inode))
Signature · 6 lines
2.11.0 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Jaegeuk Kim
maintainerPATCH 3/3 f2fs: fix not to set fsync/dentry mark
In reply to Jaegeuk KimOtherwise, we can see stale fsync/dentry mark given by previous calls, resulting in giving up roll-forward recovery due to wrong dentry mark.
Signed-off-by Jaegeuk Kim <[email protected]>
--- fs/f2fs/node.c | 3 +++ 1 file changed, 3 insertions(+)
fs/f2fs/node.c +3 -0
@@ -1458,6 +1458,9 @@ int fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode,f2fs_wait_on_page_writeback (page,NODE , true);BUG_ON (PageWriteback (page)); +set_fsync_mark (page,0 ); +set_dentry_mark (page,0 ); +if (!atomic || page == last_page) {set_fsync_mark (page,1 );if (IS_INODE (page)) {
Signature · 1 line
2.11.0