import CS xfsprogs-6.4.0-9.el9
This commit is contained in:
parent
9829db932e
commit
f556545b3b
@ -0,0 +1,35 @@
|
||||
From 2c054ce65a40bc7100ee63a0c944f2c801bff003 Mon Sep 17 00:00:00 2001
|
||||
From: "Darrick J. Wong" <djwong@kernel.org>
|
||||
Date: Thu, 14 Nov 2024 15:53:24 -0800
|
||||
Subject: [PATCH] xfs_repair: fix crasher in pf_queuing_worker
|
||||
|
||||
Don't walk off the end of the inode records when we're skipping inodes
|
||||
for prefetching. The skip loop doesn't make sense to me -- why we
|
||||
ignore the first N inodes but don't care what number they are makes
|
||||
little sense to me. But let's fix xfs/155 to crash less, eh?
|
||||
|
||||
Cc: <linux-xfs@vger.kernel.org> # v2.10.0
|
||||
Fixes: 2556c98bd9e6b2 ("Perform true sequential bulk read prefetching in xfs_repair Merge of master-melb:xfs-cmds:29147a by kenmcd.")
|
||||
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
|
||||
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
||||
Signed-off-by: Pavel Reichl <preichl@redhat.com>
|
||||
---
|
||||
repair/prefetch.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/repair/prefetch.c b/repair/prefetch.c
|
||||
index 998797e3..0772ecef 100644
|
||||
--- a/repair/prefetch.c
|
||||
+++ b/repair/prefetch.c
|
||||
@@ -764,6 +764,8 @@ pf_queuing_worker(
|
||||
irec = next_ino_rec(irec);
|
||||
num_inos += XFS_INODES_PER_CHUNK;
|
||||
}
|
||||
+ if (!irec)
|
||||
+ break;
|
||||
|
||||
if (args->dirs_only && cur_irec->ino_isa_dir == 0)
|
||||
continue;
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -0,0 +1,83 @@
|
||||
From 09f319213924f4ed144b23368e33a7ff7ef5ddd2 Mon Sep 17 00:00:00 2001
|
||||
From: "Darrick J. Wong" <djwong@kernel.org>
|
||||
Date: Thu, 14 Nov 2024 15:53:24 -0800
|
||||
Subject: [PATCH] xfs_repair: synthesize incore inode tree records when
|
||||
required
|
||||
|
||||
On a filesystem with 64k fsblock size, xfs/093 fails with the following:
|
||||
|
||||
Phase 3 - for each AG...
|
||||
- scan and clear agi unlinked lists...
|
||||
found inodes not in the inode allocation tree
|
||||
found inodes not in the inode allocation tree
|
||||
- process known inodes and perform inode discovery...
|
||||
- agno = 0
|
||||
xfs_repair: dino_chunks.c:1166: process_aginodes: Assertion `num_inos == igeo->ialloc_inos' failed.
|
||||
./common/xfs: line 392: 361225 Aborted (core dumped) $XFS_REPAIR_PROG $SCRATCH_OPTIONS $* $SCRATCH_DEV
|
||||
|
||||
In this situation, the inode size is 512b, which means that two inobt
|
||||
records map to a single fs block. However, the inobt walk didn't find
|
||||
the second record, so it didn't create a second incore ino_tree_node_t
|
||||
object. The assertion trips, and we fail to repair the filesystem.
|
||||
|
||||
To fix this, synthesize incore inode records when we know that they must
|
||||
exist. Mark the inodes as in use so that they will not be purged from
|
||||
parent directories or moved to lost+found if the directory tree is also
|
||||
compromised.
|
||||
|
||||
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
|
||||
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
||||
Signed-off-by: Pavel Reichl <preichl@redhat.com>
|
||||
---
|
||||
repair/dino_chunks.c | 28 ++++++++++++++++++++++++++++
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/repair/dino_chunks.c b/repair/dino_chunks.c
|
||||
index 19536133..86e29dd9 100644
|
||||
--- a/repair/dino_chunks.c
|
||||
+++ b/repair/dino_chunks.c
|
||||
@@ -1050,6 +1050,8 @@ process_aginodes(
|
||||
first_ino_rec = ino_rec = findfirst_inode_rec(agno);
|
||||
|
||||
while (ino_rec != NULL) {
|
||||
+ xfs_agino_t synth_agino;
|
||||
+
|
||||
/*
|
||||
* paranoia - step through inode records until we step
|
||||
* through a full allocation of inodes. this could
|
||||
@@ -1068,6 +1070,32 @@ process_aginodes(
|
||||
num_inos += XFS_INODES_PER_CHUNK;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * We didn't find all the inobt records for this block, so the
|
||||
+ * incore tree is missing a few records. This implies that the
|
||||
+ * inobt is heavily damaged, so synthesize the incore records.
|
||||
+ * Mark all the inodes in use to minimize data loss.
|
||||
+ */
|
||||
+ for (synth_agino = first_ino_rec->ino_startnum + num_inos;
|
||||
+ num_inos < igeo->ialloc_inos;
|
||||
+ synth_agino += XFS_INODES_PER_CHUNK,
|
||||
+ num_inos += XFS_INODES_PER_CHUNK) {
|
||||
+ int i;
|
||||
+
|
||||
+ ino_rec = find_inode_rec(mp, agno, synth_agino);
|
||||
+ if (ino_rec)
|
||||
+ continue;
|
||||
+
|
||||
+ ino_rec = set_inode_free_alloc(mp, agno, synth_agino);
|
||||
+ do_warn(
|
||||
+ _("found inobt record for inode %" PRIu64 " but not inode %" PRIu64 ", pretending that we did\n"),
|
||||
+ XFS_AGINO_TO_INO(mp, agno,
|
||||
+ first_ino_rec->ino_startnum),
|
||||
+ XFS_AGINO_TO_INO(mp, agno,
|
||||
+ synth_agino));
|
||||
+ for (i = 0; i < XFS_INODES_PER_CHUNK; i++)
|
||||
+ set_inode_used(ino_rec, i);
|
||||
+ }
|
||||
ASSERT(num_inos == igeo->ialloc_inos);
|
||||
|
||||
if (pf_args) {
|
||||
--
|
||||
2.53.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Summary: Utilities for managing the XFS filesystem
|
||||
Name: xfsprogs
|
||||
Version: 6.4.0
|
||||
Release: 7%{?dist}
|
||||
Release: 9%{?dist}
|
||||
License: GPL+ and LGPLv2+
|
||||
URL: https://xfs.wiki.kernel.org
|
||||
Source0: http://kernel.org/pub/linux/utils/fs/xfs/xfsprogs/%{name}-%{version}.tar.xz
|
||||
@ -42,6 +42,8 @@ Patch14: xfsprogs-for-next-xfs_repair-allow-symlinks-with-short-remote-targets.p
|
||||
Patch15: xfsprogs-6.14.0-xfs_repair-handling-a-block-with-bad-crc-bad-uuid-an.patch
|
||||
Patch16: xfsprogs-for-next-xfs_repair-Bump-link-count-if-longform_dir2_rebuild-.patch
|
||||
Patch17: xfsprogs-for-next-xfs_repair-phase6-scan-longform-entries-before-heade.patch
|
||||
Patch18: xfsprogs-6.12.0-xfs_repair-fix-crasher-in-pf_queuing_worker.patch
|
||||
Patch19: xfsprogs-6.12.0-xfs_repair-synthesize-incore-inode-tree-records-when.patch
|
||||
|
||||
%description
|
||||
A set of commands to use the XFS filesystem, including mkfs.xfs.
|
||||
@ -154,6 +156,15 @@ install -m 0644 %{SOURCE3} %{buildroot}%{mkfsdir}
|
||||
%{_libdir}/*.so
|
||||
|
||||
%changelog
|
||||
* Tue Mar 31 2026 Veronika Kabatova <vkabatov@redhat.com> - 6.4.0-9
|
||||
- Rebuild to fix missing binaries due to buildsystem oversight
|
||||
|
||||
* Tue Mar 17 2026 Pavel Reichl <preichl@redhat.com> - 6.4.0-8
|
||||
- Fix FS/XFS: xfs/155 test with 64k block and
|
||||
- FS/XFS: xfs/154 test with dax
|
||||
- Related: RHEL-145813
|
||||
- Related: RHEL-146169
|
||||
|
||||
* Tue May 13 2025 Pavel Reichl <preichl@redhat.com> - 6.4.0-7
|
||||
- xfs unrepairable filesystem if directory block not junked in phase 3 - more
|
||||
- fixes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user