Whamcloud - gitweb
LU-18120 ldiskfs: improve a quota speedup patch 79/55979/2
authorAlexey Lyashkov <alexey.lyashkov@hpe.com>
Fri, 9 Aug 2024 08:33:42 +0000 (11:33 +0300)
committerOleg Drokin <green@whamcloud.com>
Sun, 24 Nov 2024 06:01:50 +0000 (06:01 +0000)
current patch might have a small window to make write duplicate,
lets avoid it.

HPe-bug-id: LUS-12432
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Change-Id: I8de2e675d3bf5d5cbb41b25b04affe1d5e0d6411
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55979
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ldiskfs/kernel_patches/patches/rhel7.6/ext4-dquot-commit-speedup.patch
ldiskfs/kernel_patches/patches/rhel9/ext4-dquot-commit-speedup.patch

index 2b32630..ca53ebd 100644 (file)
@@ -1,11 +1,14 @@
---- 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
+Index: linux-stage/fs/ext4/super.c
+===================================================================
+--- linux-stage.orig/fs/ext4/super.c
++++ linux-stage/fs/ext4/super.c
+@@ -5795,7 +5795,8 @@ static int ext4_mark_dquot_dirty(struct
        /* Are we journaling quotas? */
-       if (EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_QUOTA) ||
+       if (ext4_has_feature_quota(sb) ||
            sbi->s_qf_names[USRQUOTA] || sbi->s_qf_names[GRPQUOTA]) {
-+              if (test_bit(DQ_MOD_B, &dquot->dq_flags))
+-              dquot_mark_dquot_dirty(dquot);
++              if (dquot_mark_dquot_dirty(dquot))
 +                      return 0;
-               dquot_mark_dquot_dirty(dquot);
                return ext4_write_dquot(dquot);
        } else {
+               return dquot_mark_dquot_dirty(dquot);
index 3db463a..04a5f69 100644 (file)
@@ -1,11 +1,11 @@
 --- a/fs/ext4/super.c  2023-05-12 10:38:47.356662467 -0700
 +++ b/fs/ext4/super.c  2023-05-12 10:42:30.325161896 -0700
-@@ -6739,6 +6739,8 @@ static int ext4_mark_dquot_dirty(struct
+@@ -6739,6 +6739,7 @@ static int ext4_mark_dquot_dirty(struct
        struct super_block *sb = dquot->dq_sb;
  
        if (ext4_is_quota_journalled(sb)) {
-+              if (test_bit(DQ_MOD_B, &dquot->dq_flags))
+-              dquot_mark_dquot_dirty(dquot);
++              if (dquot_mark_dquot_dirty(dquot))
 +                      return 0;
-               dquot_mark_dquot_dirty(dquot);
                return ext4_write_dquot(dquot);
        } else {