From dad25f258e50895b4bd5fce30765599a7a490aa0 Mon Sep 17 00:00:00 2001 From: Andrew Perepechko Date: Wed, 11 Jul 2018 16:32:33 +0300 Subject: [PATCH 1/1] LU-12353 ldiskfs: speedup quota journalling ldiskfs_mark_dquot_dirty() need not call ldiskfs_write_dquot() if the dquot is already dirty since we are guaranteed that another thread is already writing the dquot and will update the buffer with the latest dquot data. Change-Id: Ia65c5987bbb0d6d2ac94c5499cb8b51edc3c49c3 Signed-off-by: Andrew Perepechko Cray-bug-id: LUS-5342 Reviewed-on: https://review.whamcloud.com/34992 Tested-by: jenkins Reviewed-by: Wang Shilong Tested-by: Maloo Reviewed-by: Hongchao Zhang Reviewed-by: Andreas Dilger --- .../patches/rhel7.6/ext4-dquot-commit-speedup.patch | 11 +++++++++++ ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.6.series | 1 + ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.7.series | 1 + ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.8.series | 1 + ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.9.series | 1 + 5 files changed, 15 insertions(+) create mode 100644 ldiskfs/kernel_patches/patches/rhel7.6/ext4-dquot-commit-speedup.patch diff --git a/ldiskfs/kernel_patches/patches/rhel7.6/ext4-dquot-commit-speedup.patch b/ldiskfs/kernel_patches/patches/rhel7.6/ext4-dquot-commit-speedup.patch new file mode 100644 index 0000000..2b32630 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/rhel7.6/ext4-dquot-commit-speedup.patch @@ -0,0 +1,11 @@ +--- a/fs/ext4/super.c 2018-07-11 16:27:46.890341960 +0300 ++++ b/fs/ext4/super.c 2018-07-11 16:29:17.549061853 +0300 +@@ -5403,6 +5403,8 @@ static int ext4_mark_dquot_dirty(struct + /* Are we journaling quotas? */ + if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA) || + sbi->s_qf_names[USRQUOTA] || sbi->s_qf_names[GRPQUOTA]) { ++ if (test_bit(DQ_MOD_B, &dquot->dq_flags)) ++ return 0; + dquot_mark_dquot_dirty(dquot); + return ext4_write_dquot(dquot); + } else { diff --git a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.6.series b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.6.series index f130545..ad0d05a 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.6.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.6.series @@ -48,3 +48,4 @@ rhel7.6/ext4-limit-number-of-scanned-extents-in-status-tree-.patch rhel7.6/ext4-cleanup-flag-definitions-for-extent-status-tree.patch rhel7.6/ext4-introduce-aging-to-extent-status-tree.patch base/ext4-no-max-dir-size-limit-for-iam-objects.patch +rhel7.6/ext4-dquot-commit-speedup.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.7.series b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.7.series index 018fae1..88c5369 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.7.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.7.series @@ -48,3 +48,4 @@ rhel7.6/ext4-limit-number-of-scanned-extents-in-status-tree-.patch rhel7.6/ext4-cleanup-flag-definitions-for-extent-status-tree.patch rhel7.6/ext4-introduce-aging-to-extent-status-tree.patch base/ext4-no-max-dir-size-limit-for-iam-objects.patch +rhel7.6/ext4-dquot-commit-speedup.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.8.series b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.8.series index defacc9..8ee2757 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.8.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.8.series @@ -41,3 +41,4 @@ rhel7.6/ext4-simple-blockalloc.patch rhel7.6/ext4-mballoc-skip-uninit-groups-cr0.patch rhel7.7/ext4-mballoc-prefetch.patch base/ext4-no-max-dir-size-limit-for-iam-objects.patch +rhel7.6/ext4-dquot-commit-speedup.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.9.series b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.9.series index 8e7402f..e3e094e 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.9.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-3.10-rhel7.9.series @@ -41,3 +41,4 @@ rhel7.6/ext4-simple-blockalloc.patch rhel7.6/ext4-mballoc-skip-uninit-groups-cr0.patch rhel7.7/ext4-mballoc-prefetch.patch base/ext4-no-max-dir-size-limit-for-iam-objects.patch +rhel7.6/ext4-dquot-commit-speedup.patch -- 1.8.3.1