f2fs: manipulate dirty file inodes when DATA_FLUSH is set
It needs to maintain dirty file inodes only if DATA_FLUSH is set. Otherwise, let's avoid its overhead. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Родитель
087968974f
Коммит
10aa97c379
|
@ -785,9 +785,11 @@ void update_dirty_page(struct inode *inode, struct page *page)
|
||||||
!S_ISLNK(inode->i_mode))
|
!S_ISLNK(inode->i_mode))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
spin_lock(&sbi->inode_lock[type]);
|
if (type != FILE_INODE || test_opt(sbi, DATA_FLUSH)) {
|
||||||
__add_dirty_inode(inode, type);
|
spin_lock(&sbi->inode_lock[type]);
|
||||||
spin_unlock(&sbi->inode_lock[type]);
|
__add_dirty_inode(inode, type);
|
||||||
|
spin_unlock(&sbi->inode_lock[type]);
|
||||||
|
}
|
||||||
|
|
||||||
inode_inc_dirty_pages(inode);
|
inode_inc_dirty_pages(inode);
|
||||||
SetPagePrivate(page);
|
SetPagePrivate(page);
|
||||||
|
@ -803,6 +805,9 @@ void remove_dirty_inode(struct inode *inode)
|
||||||
!S_ISLNK(inode->i_mode))
|
!S_ISLNK(inode->i_mode))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (type == FILE_INODE && !test_opt(sbi, DATA_FLUSH))
|
||||||
|
return;
|
||||||
|
|
||||||
spin_lock(&sbi->inode_lock[type]);
|
spin_lock(&sbi->inode_lock[type]);
|
||||||
__remove_dirty_inode(inode, type);
|
__remove_dirty_inode(inode, type);
|
||||||
spin_unlock(&sbi->inode_lock[type]);
|
spin_unlock(&sbi->inode_lock[type]);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче