Blame SOURCES/e2fsprogs-1.45.6-quota-Do-not-account-space-used-by-project-quota-fil.patch

a77133
From 7c9b477d25a81ef736a832d66793a75860394d6f Mon Sep 17 00:00:00 2001
a77133
From: Jan Kara <jack@suse.cz>
a77133
Date: Mon, 12 Jul 2021 17:43:08 +0200
a77133
Subject: [PATCH 39/46] quota: Do not account space used by project quota file
a77133
 to quota
a77133
Content-Type: text/plain
a77133
a77133
Project quota files have high inode numbers but are not accounted in
a77133
quota usage. Do not track them when computing quota usage.
a77133
a77133
Signed-off-by: Jan Kara <jack@suse.cz>
a77133
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
a77133
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
a77133
---
a77133
 lib/support/mkquota.c | 8 +++++---
a77133
 1 file changed, 5 insertions(+), 3 deletions(-)
a77133
a77133
diff --git a/lib/support/mkquota.c b/lib/support/mkquota.c
a77133
index 6f7ae6d6..ef50c9ab 100644
a77133
--- a/lib/support/mkquota.c
a77133
+++ b/lib/support/mkquota.c
a77133
@@ -500,9 +500,11 @@ errcode_t quota_compute_usage(quota_ctx_t qctx)
a77133
 		}
a77133
 		if (ino == 0)
a77133
 			break;
a77133
-		if (inode->i_links_count &&
a77133
-		    (ino == EXT2_ROOT_INO ||
a77133
-		     ino >= EXT2_FIRST_INODE(fs->super))) {
a77133
+		if (!inode->i_links_count)
a77133
+			continue;
a77133
+		if (ino == EXT2_ROOT_INO ||
a77133
+		    (ino >= EXT2_FIRST_INODE(fs->super) &&
a77133
+		     ino != quota_type2inum(PRJQUOTA, fs->super))) {
a77133
 			space = ext2fs_get_stat_i_blocks(fs,
a77133
 						EXT2_INODE(inode)) << 9;
a77133
 			quota_data_add(qctx, inode, ino, space);
a77133
-- 
a77133
2.35.1
a77133