Linux XFS filesystem development
 help / color / mirror / Atom feed
* [PATCHSET] xfs_scrub: codex-inspired bug fixes for 7.1
@ 2026-06-04  6:04 Darrick J. Wong
  2026-06-04  6:04 ` [PATCH 01/21] xfs_scrub_media_fail: reduce security lockdowns to avoid postfix problems Darrick J. Wong
                   ` (20 more replies)
  0 siblings, 21 replies; 46+ messages in thread
From: Darrick J. Wong @ 2026-06-04  6:04 UTC (permalink / raw)
  To: aalbersh, djwong; +Cc: linux-xfs, linux-xfs, hch

Hi all,

I then threw Codex at the entirety of the xfs_scrub codebase to see what
kinds of problems it would report.  I picked off the obviously
delusional complaints, and fixed the rest as well.  There are a lot of
fixes here, but most of them are for nitpicky details that C is terrible
at, footgun fixes, and missing corner case handling.

If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.

With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.

--D

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=scrub-codex-fixes
---
Commits in this patchset:
 * xfs_scrub_media_fail: reduce security lockdowns to avoid postfix problems
 * xfs_scrub_all: fix broken command line string array construction
 * xfs_scrub_all_fail: reduce security lockdowns to avoid postfix problems
 * xfs_scrub_fail: send content headers for xfs_scrub_all failures
 * xfs_scrub: fix uninitialized variable
 * xfs_scrub: fix integer overflows
 * xfs_scrub: don't count internal log space in the data device used count
 * xfs_scrub: widen scrub and repair dependency mask
 * xfs_scrub: fix work estimation for rtgroups filesystems
 * xfs_scrub: don't report media errors in specially-owned areas as file data
 * xfs_scrub: return SCRUB_RET_OPERROR if unicode collision detection fails to initialize
 * xfs_scrub: fix nonsense advice after a scrub finds errors
 * xfs_scrub: don't allow NAN as fstrim percentage
 * xfs_scrub: reset bulkstat pointer on retry
 * xfs_scrub: don't return garbage value from bulkstat_the_rest
 * xfs_scrub: don't continue with phase1 if autofsck=none
 * xfs_scrub: don't crash trying to complain about clean health
 * xfs_scrub: fix inverted return value from ptvar_get
 * xfs_scrub: don't obscure repair failures in repair_list_schedule
 * xfs_scrub: bitmap iteration functions must retur
 * xfs_scrub: read verification isn't ok if it hit runtime errors
---
 scrub/scrub_private.h                  |    2 +
 scrub/xfs_scrub.h                      |    2 +
 scrub/inodes.c                         |   17 +++++++--
 scrub/phase1.c                         |    5 ++-
 scrub/phase2.c                         |    2 +
 scrub/phase3.c                         |    4 +-
 scrub/phase4.c                         |   11 ++++--
 scrub/phase5.c                         |    4 +-
 scrub/phase6.c                         |    4 ++
 scrub/phase7.c                         |    4 --
 scrub/phase8.c                         |    2 +
 scrub/read_verify.c                    |    2 +
 scrub/repair.c                         |   10 +++--
 scrub/scrub.c                          |   23 +++++++++---
 scrub/xfs_scrub.c                      |   18 ++++++++--
 scrub/xfs_scrub_all.py.in              |    2 +
 scrub/xfs_scrub_all_fail.service.in    |   59 +++-----------------------------
 scrub/xfs_scrub_fail.in                |    2 +
 scrub/xfs_scrub_media_fail@.service.in |   58 ++-----------------------------
 19 files changed, 84 insertions(+), 147 deletions(-)


^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2026-06-11 14:05 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04  6:04 [PATCHSET] xfs_scrub: codex-inspired bug fixes for 7.1 Darrick J. Wong
2026-06-04  6:04 ` [PATCH 01/21] xfs_scrub_media_fail: reduce security lockdowns to avoid postfix problems Darrick J. Wong
2026-06-04 12:16   ` Andrey Albershteyn
2026-06-04 16:48     ` Darrick J. Wong
2026-06-04  6:04 ` [PATCH 02/21] xfs_scrub_all: fix broken command line string array construction Darrick J. Wong
2026-06-04 12:17   ` Andrey Albershteyn
2026-06-04  6:05 ` [PATCH 03/21] xfs_scrub_all_fail: reduce security lockdowns to avoid postfix problems Darrick J. Wong
2026-06-04 12:21   ` Andrey Albershteyn
2026-06-04 16:49     ` Darrick J. Wong
2026-06-04  6:05 ` [PATCH 04/21] xfs_scrub_fail: send content headers for xfs_scrub_all failures Darrick J. Wong
2026-06-04 12:23   ` Andrey Albershteyn
2026-06-04  6:05 ` [PATCH 05/21] xfs_scrub: fix uninitialized variable Darrick J. Wong
2026-06-04 12:24   ` Andrey Albershteyn
2026-06-04  6:05 ` [PATCH 06/21] xfs_scrub: fix integer overflows Darrick J. Wong
2026-06-04 12:25   ` Andrey Albershteyn
2026-06-04  6:06 ` [PATCH 07/21] xfs_scrub: don't count internal log space in the data device used count Darrick J. Wong
2026-06-11  8:25   ` Andrey Albershteyn
2026-06-04  6:06 ` [PATCH 08/21] xfs_scrub: widen scrub and repair dependency mask Darrick J. Wong
2026-06-04 12:37   ` Andrey Albershteyn
2026-06-04  6:06 ` [PATCH 09/21] xfs_scrub: fix work estimation for rtgroups filesystems Darrick J. Wong
2026-06-04 13:48   ` Andrey Albershteyn
2026-06-04  6:06 ` [PATCH 10/21] xfs_scrub: don't report media errors in specially-owned areas as file data Darrick J. Wong
2026-06-11  9:14   ` Andrey Albershteyn
2026-06-11 14:05     ` Darrick J. Wong
2026-06-04  6:07 ` [PATCH 11/21] xfs_scrub: return SCRUB_RET_OPERROR if unicode collision detection fails to initialize Darrick J. Wong
2026-06-04 13:55   ` Andrey Albershteyn
2026-06-04  6:07 ` [PATCH 12/21] xfs_scrub: fix nonsense advice after a scrub finds errors Darrick J. Wong
2026-06-04 13:59   ` Andrey Albershteyn
2026-06-04  6:07 ` [PATCH 13/21] xfs_scrub: don't allow NAN as fstrim percentage Darrick J. Wong
2026-06-04 14:03   ` Andrey Albershteyn
2026-06-04  6:07 ` [PATCH 14/21] xfs_scrub: reset bulkstat pointer on retry Darrick J. Wong
2026-06-04 14:09   ` Andrey Albershteyn
2026-06-04  6:08 ` [PATCH 15/21] xfs_scrub: don't return garbage value from bulkstat_the_rest Darrick J. Wong
2026-06-04 14:13   ` Andrey Albershteyn
2026-06-04  6:08 ` [PATCH 16/21] xfs_scrub: don't continue with phase1 if autofsck=none Darrick J. Wong
2026-06-04 14:19   ` Andrey Albershteyn
2026-06-04  6:08 ` [PATCH 17/21] xfs_scrub: don't crash trying to complain about clean health Darrick J. Wong
2026-06-04 14:24   ` Andrey Albershteyn
2026-06-04  6:09 ` [PATCH 18/21] xfs_scrub: fix inverted return value from ptvar_get Darrick J. Wong
2026-06-04 14:28   ` Andrey Albershteyn
2026-06-04  6:09 ` [PATCH 19/21] xfs_scrub: don't obscure repair failures in repair_list_schedule Darrick J. Wong
2026-06-04 15:27   ` Andrey Albershteyn
2026-06-04  6:09 ` [PATCH 20/21] xfs_scrub: bitmap iteration functions must retur Darrick J. Wong
2026-06-04 15:30   ` Andrey Albershteyn
2026-06-04  6:09 ` [PATCH 21/21] xfs_scrub: read verification isn't ok if it hit runtime errors Darrick J. Wong
2026-06-04 15:35   ` Andrey Albershteyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox