[Devel] [PATCH RHEL7 COMMIT] ve/fs/sync: don't skip dirty metadata on filtered sync
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Feb 18 03:02:54 PST 2016
The commit is pushed to "branch-rh7-3.10.0-327.3.1-vz7.10.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.3.1.vz7.10.12
------>
commit 43cb9daab86c674bc435fff988f36b1fad996247
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date: Thu Feb 18 15:01:05 2016 +0400
ve/fs/sync: don't skip dirty metadata on filtered sync
Port of diff-ubc-dont-skip-dirty-metadata-on-filtered-sync patch
from PCS6.
Don't skip dirty metadata during per container sync[fs].
date: 2012/01/11 19:59:46; author: xemul; state: Exp;
Author: Konstantin Khlebnikov
Email: khlebnikov at openvz.org
Subject: ubc: disable filtered sync for too dirty inodes
Date: Tue, 10 Jan 2012 17:45:25 +0400
Filter only inodes with clean meta-data.
We cannot filter writes in this case. Actually we only move writes to
the journal thread, and it submit them in not very effective way.
Found-by: Alexey Kuznetsov <kuznet at parallels.com>
Signed-off-by: Konstantin Khlebnikov <khlebnikov at openvz.org>
https://jira.sw.ru/browse/PSBM-39583
And the issue below is caused because we don't account metadata =>
inodes with dirty metadata could be detached from UB
(mapping->dirtied_ub == NULL). So sync() will skip such inodes.
With this patch sync() will skip inodes with dirty data only.
https://jira.sw.ru/browse/PSBM-44125
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
Reviewed-by: Vladimir Davydov <vdavydov at virtuozzo.com>
khorenko@: we still have 2 cases:
1) bindmount from host into a CT => dirtied_ub will be set, but not "ours",
but we still want to sync inodes with dirty metadata because of the single
journal
2) we've dropped vzfs, but still have simfs case: again a single journal =>
we should commit inodes with dirty metadata even in case they (inodes) do not
belong to "our" Container.
---
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 b6b33d0..101892a 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -714,6 +714,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);
@@ -1411,7 +1412,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;
}
More information about the Devel
mailing list