[Devel] [PATCH rh7 v2 3/3] ve/fs/sync: don't skip dirty metatdata on filtered sync

Andrey Ryabinin aryabinin at virtuozzo.com
Tue Feb 2 07:51:56 PST 2016


Port of diff-ubc-dont-skip-dirty-metadata-on-filtered-sync patch
from PCS6.

Don't skip dirty metadata during per container sync[fs].

https://jira.sw.ru/browse/PSBM-39583

Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
 fs/fs-writeback.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 5817404..a3d0197 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -729,6 +729,7 @@ static long writeback_sb_inodes(struct super_block *sb,
 			continue;
 		}
 		if ((work->ub || work->filter_ub) &&
+		    ((inode->i_state & I_DIRTY) == I_DIRTY_PAGES) &&
 		     ub_should_skip_writeback(work->ub, inode)) {
 			spin_unlock(&inode->i_lock);
 			redirty_tail(inode, wb);
@@ -1410,7 +1411,8 @@ static void wait_sb_inodes(struct super_block *sb, struct user_beancounter *ub)
 			spin_unlock(&inode->i_lock);
 			continue;
 		}
-		if (ub && (mapping->dirtied_ub != ub)) {
+		if (ub && (mapping->dirtied_ub != ub) &&
+		    ((inode->i_state & I_DIRTY) == I_DIRTY_PAGES)) {
 			spin_unlock(&inode->i_lock);
 			continue;
 		}
-- 
2.4.10



More information about the Devel mailing list