Viewing: ext4-dquot-commit-speedup.patch

commit dad25f258e50895b4bd5fce30765599a7a490aa0
Author:     Andrew Perepechko <andrew.perepechko@hpe.com>
AuthorDate: Wed Jul 11 16:32:33 2018 +0300
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.

Signed-off-by: Andrew Perepechko <c17827@cray.com>
Cray-bug-id: LUS-5342
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia65c5987bbb0d6d2ac94c5499cb8b51edc3c49c3
Reviewed-on: https://review.whamcloud.com/34992

--- 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,7 @@ static int ext4_mark_dquot_dirty(struct
 	struct super_block *sb = dquot->dq_sb;
 
 	if (ext4_is_quota_journalled(sb)) {
-		dquot_mark_dquot_dirty(dquot);
+		if (dquot_mark_dquot_dirty(dquot))
+			return 0;
 		return ext4_write_dquot(dquot);
 	} else {