xfsprogs/xfsprogs-6.4.0-xfs_repair-don-t-add-junked-entries-to-the-rebuilt-d.patch
Pavel Reichl c49945ae5f Rebase to upstream version 6.3.0
-
Following is a list of dropped backported patches which
are contained in the current rebase:
xfsprogs-5.19.0-xfs-hoist-refcount-record-merge-predicates.patch (v6.2.0)
xfsprogs-5.19.0-xfs_db-fix-dir3-block-magic-check.patch (v6.1.0)
xfsprogs-5.19.0-xfs-estimate-post-merge-refcounts-correctly.patch (v6.2.0)
xfsprogs-5.19.0-xfs-get-rid-of-assert-from-xfs_btree_islastblock.patch (v6.2.0)
xfsprogs-5.19.0-xfs-fix-off-by-one-error-in-xfs_btree_space_to_heigh.patch (v6.2.0)
xfsprogs-5.19.0-xfs-fix-sb-write-verify-for-lazysbcount.patch (v6.1.0)
xfsprogs-5.19.0-xfs-removed-useless-condition-in-function-xfs_attr_n.patch (v6.0.0)
xfsprogs-5.19.0-xfs_repair-retain-superblock-buffer-to-avoid-write-h.patch (v6.1.0)
-
Rename the remaining patches so the name contains upstream version in which
they are implemented, or "rhelonly".
-
Drop Eric Sandeen's public key used to check tarball signature and replace it by
Carlos Maiolino's (current upstream xfsprogs maintainer).
-
Following is a list of newly backported patches from versions released after 6.3
which are fixing patches present in version 6.3:
xfsprogs-6.4.0-xfs_repair-don-t-add-junked-entries-to-the-rebuilt-d.patch
xfsprogs-6.4.0-xfs_repair-don-t-spray-correcting-imap-all-by-itself.patch
xfsprogs-6.4.0-xfs_repair-fix-messaging-when-fixing-imap-due-to-spa.patch
xfsprogs-6.4.0-xfs_repair-fix-messaging-when-shortform_dir2_junk-is.patch
-
Backport:
xfsprogs-6.4.0-xfs_db-move-obfuscate_name-assertion-to-callers.patch
xfsprogs-6.4.0-xfs_db-fix-metadump-name-obfuscation-for-ascii-ci-fi.patch
xfsprogs-6.4.0-xfs-stabilize-the-dirent-name-transformation-functio.patch
to implement RHEL-RHEL-8284
-
Backport xfsprogs-rhelonly-xfs_quota-fix-missing-mount-point-warning.patch
to implement RHEL-7900
-
Resolves: RHEL-15399
Resolves: RHEL-8284
Resolves: RHEL-7900

Signed-off-by: Pavel Reichl <preichl@redhat.com>
2023-11-14 22:44:52 +01:00

42 lines
1.5 KiB
Diff

From aca02624815ca47c6fd4cafdb0aeaad641ca1915 Mon Sep 17 00:00:00 2001
From: "Darrick J. Wong" <djwong@kernel.org>
Date: Mon, 5 Jun 2023 08:37:24 -0700
Subject: [PATCH] xfs_repair: don't add junked entries to the rebuilt directory
If a directory contains multiple entries with the same name, we create
separate objects in the directory hashtab for each dirent. The first
one has p->junkit==0, but the subsequent ones have p->junkit==1.
Because these are duplicate names that are not garbage, the first
character of p->name.name is not set to a slash.
Don't add these subsequent hashtab entries to the rebuilt directory.
Found by running xfs/155 with the parent pointers patchset enabled.
Fixes: 33165ec3b4b ("Fix dirv2 rebuild in phase6 Merge of master-melb:xfs-cmds:26664a by kenmcd.")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Pavel Reichl <preichl@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
repair/phase6.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/repair/phase6.c b/repair/phase6.c
index 25bbcd10..3870c5c9 100644
--- a/repair/phase6.c
+++ b/repair/phase6.c
@@ -1316,7 +1316,8 @@ longform_dir2_rebuild(
/* go through the hash list and re-add the inodes */
for (p = hashtab->first; p; p = p->nextbyorder) {
-
+ if (p->junkit)
+ continue;
if (p->name.name[0] == '/' || (p->name.name[0] == '.' &&
(p->name.len == 1 || (p->name.len == 2 &&
p->name.name[1] == '.'))))
--
2.41.0