summaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-08-03 11:25:55 +0200
committerJan Kara <jack@suse.cz>2017-08-17 22:00:54 +0200
commit91389240a252ba3ced356404f0e3426958d619e4 (patch)
tree8ebf413b5cd55bdd1fce595d1683a7f89d5cbab7 /fs/ext4/super.c
parent834057bf846691552a8906f7ed3f67546e5f897c (diff)
downloadblackbird-op-linux-91389240a252ba3ced356404f0e3426958d619e4.tar.gz
blackbird-op-linux-91389240a252ba3ced356404f0e3426958d619e4.zip
ext4: Disable dirty list tracking of dquots when journalling quotas
When journalling quotas, we writeback all dquots immediately after changing them as part of current transation. Thus there's no need to write anything in dquot_writeback_dquots() and so we can avoid updating list of dirty dquots to reduce dq_list_lock contention. This change reduces time to create 500000 files on ext4 on ramdisk by 50 different processes in separate directories by 15% when user quota is turned on. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4c168b90903c..16a877a0f309 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5404,6 +5404,13 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
ext4_msg(sb, KERN_WARNING,
"Quota file not on filesystem root. "
"Journaled quota will not work");
+ sb_dqopt(sb)->flags |= DQUOT_NOLIST_DIRTY;
+ } else {
+ /*
+ * Clear the flag just in case mount options changed since
+ * last time.
+ */
+ sb_dqopt(sb)->flags &= ~DQUOT_NOLIST_DIRTY;
}
/*
@@ -5500,7 +5507,7 @@ static int ext4_enable_quotas(struct super_block *sb)
test_opt(sb, PRJQUOTA),
};
- sb_dqopt(sb)->flags |= DQUOT_QUOTA_SYS_FILE;
+ sb_dqopt(sb)->flags |= DQUOT_QUOTA_SYS_FILE | DQUOT_NOLIST_DIRTY;
for (type = 0; type < EXT4_MAXQUOTAS; type++) {
if (qf_inums[type]) {
err = ext4_quota_enable(sb, type, QFMT_VFS_V1,
OpenPOWER on IntegriCloud