FAILED: patch "[PATCH] xfs: rtsummary scrub should treat rtbitmap corruption errors" failed to apply to 6.18-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x 8ed78104722b57df69478b0b1608a408c1036085
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026082038-basis-zookeeper-14ec@gregkh' --subject-prefix 'PATCH 6.18.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 8ed78104722b57df69478b0b1608a408c1036085 Mon Sep 17 00:00:00 2001
From: "Darrick J. Wong" <[email protected]>
Date: Mon, 20 Jul 2026 20:24:17 -0700
Subject: [PATCH] xfs: rtsummary scrub should treat rtbitmap corruption errors
as an xref error
LOLLM notes the discrepancy between the comment saying that this is an xref error and the code, which marks a (non-xref) corruption error. This appears to be a regression.
fs/xfs/scrub/rtsummary.c +1 -1
@@ -358,7 +358,7 @@ xchk_rtsummary(* EFSCORRUPTED means the rtbitmap is corrupt, which is an xref * error since we're checking the summary file. */ -xchk_ip_set_corrupt (sc, rbmip); +xchk_ip_xref_set_corrupt (sc, rbmip);return 0 ; }if (error)
Sasha Levin
maintainerPATCH 1/2 xfs: add a xchk_ip_set_corrupt helper
From: Christoph Hellwig <[email protected]>
[ Upstream commit aa7cfdb6e16b474328c79736f9b9dad09addc81c ]
Add a smaller wrapper to set a inode corrupted by the xfs_inode pointer.
Stable-dep-of: 8ed78104722b ("xfs: rtsummary scrub should treat rtbitmap corruption errors as an xref error")
--- fs/xfs/scrub/bmap.c | 8 ++++---- fs/xfs/scrub/common.c | 10 +++++----- fs/xfs/scrub/common.h | 2 ++ fs/xfs/scrub/dir.c | 2 +- fs/xfs/scrub/dirtree.c | 4 ++-- fs/xfs/scrub/metapath.c | 6 +++--- fs/xfs/scrub/nlinks.c | 12 ++++++------ fs/xfs/scrub/parent.c | 6 +++--- fs/xfs/scrub/rtbitmap.c | 12 ++++++------ fs/xfs/scrub/rtsummary.c | 12 ++++++------ 10 files changed, 38 insertions(+), 36 deletions(-)
fs/xfs/scrub/bmap.c +4 -4
@@ -1040,7 +1040,7 @@ xchk_bmap(case XFS_COW_FORK :/* No CoW forks filesystem doesn't support out of place writes */ if (!xfs_has_reflink (mp) && !xfs_has_zoned (mp)) { -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip);return 0 ; }break ;
@@ -1052,7 +1052,7 @@ xchk_bmap(* attr here. */ if (!xfs_has_attr (mp)) -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip);break ;default :ASSERT (whichfork ==XFS_DATA_FORK );
@@ -1137,7 +1137,7 @@ xchk_bmap_data(int error;if (xchk_file_looks_zapped (sc,XFS_SICK_INO_BMBTD_ZAPPED )) { -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip);return 0 ; }
@@ -1165,7 +1165,7 @@ xchk_bmap_attr(* returning immediately. */ if (xchk_file_looks_zapped (sc,XFS_SICK_INO_BMBTA_ZAPPED )) { -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip);return 0 ; }
fs/xfs/scrub/common.c +5 -5
@@ -1099,7 +1099,7 @@ xchk_install_live_inode( struct xfs_inode *ip) {if (!igrab (VFS_I (ip))) { -xchk_ino_set_corrupt (sc, ip->i_ino); +xchk_ip_set_corrupt (sc, ip);return -EFSCORRUPTED ; }
@@ -1428,13 +1428,13 @@ xchk_metadata_inode_forks(/* Metadata inodes don't live on the rt device. */ if (sc->ip->i_diflags &XFS_DIFLAG_REALTIME ) { -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip);return 0 ; }/* They should never participate in reflink. */ if (xfs_is_reflink_inode (sc->ip)) { -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip);return 0 ; }
@@ -1451,7 +1451,7 @@ xchk_metadata_inode_forks( &error))return error;if (shared) -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip); }/*
@@ -1460,7 +1460,7 @@ xchk_metadata_inode_forks(*/ if (xfs_inode_hasattr (sc->ip)) {if (!xfs_has_metadir (sc->mp)) { -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip);return 0 ; }
fs/xfs/scrub/common.h +2 -0
@@ -30,6 +30,8 @@ void xchk_set_corrupt(struct xfs_scrub *sc);void xchk_block_set_corrupt (struct xfs_scrub *sc,struct xfs_buf *bp);void xchk_ino_set_corrupt (struct xfs_scrub *sc,xfs_ino_t ino); +#define xchk_ip_set_corrupt (_sc, _ip) \ + xchk_ino_set_corrupt((_sc), (_ip)->i_ino)void xchk_fblock_set_corrupt (struct xfs_scrub *sc,int whichfork,xfs_fileoff_t offset);#ifdef CONFIG_XFS_QUOTA
fs/xfs/scrub/dir.c +1 -1
@@ -1075,7 +1075,7 @@ xchk_directory(/* Plausible size? */ if (sc->ip->i_disk_size <xfs_dir2_sf_hdr_size (0 )) { -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip);return 0 ; }
fs/xfs/scrub/dirtree.c +2 -2
@@ -979,10 +979,10 @@ xchk_dirtree(xchk_dirtree_evaluate (dl, &oc);if (xchk_dirtree_parentless (dl)) {if (oc.good || oc.bad || oc.suspect) -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip); }else {if (oc.bad || oc.good + oc.suspect !=1 ) -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip);if (oc.suspect)xchk_ino_xref_set_corrupt (sc, sc->ip->i_ino); }
fs/xfs/scrub/metapath.c +3 -3
@@ -314,7 +314,7 @@ xchk_metapath(/* Parent required to do anything else. */ if (mpath->dp ==NULL ) { -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip);return 0 ; }
@@ -329,7 +329,7 @@ xchk_metapath(trace_xchk_metapath_lookup (sc, mpath->path, mpath->dp, ino);if (error == -ENOENT ) {/* No directory entry at all */ -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip); error =0 ; goto out_ilock; }
@@ -337,7 +337,7 @@ xchk_metapath( goto out_ilock;if (ino != sc->ip->i_ino) {/* Pointing to wrong inode */ -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip); } out_ilock:
fs/xfs/scrub/nlinks.c +6 -6
@@ -719,7 +719,7 @@ xchk_nlinks_compare_inode(* count, but it will let them decrease it. */ if (total_links >XFS_NLINK_PINNED ) { -xchk_ino_set_corrupt (sc, ip->i_ino); +xchk_ip_set_corrupt (sc, ip); goto out_corrupt; }else if (total_links >XFS_MAXLINK ) {xchk_ino_set_warning (sc, ip->i_ino);
@@ -727,7 +727,7 @@ xchk_nlinks_compare_inode(/* Link counts should match. */ if (total_links != actual_nlink) { -xchk_ino_set_corrupt (sc, ip->i_ino); +xchk_ip_set_corrupt (sc, ip); goto out_corrupt; }
@@ -748,7 +748,7 @@ xchk_nlinks_compare_inode(* back references. */ if (obs.backrefs !=0 ) { -xchk_ino_set_corrupt (sc, ip->i_ino); +xchk_ip_set_corrupt (sc, ip); goto out_corrupt; }
@@ -757,7 +757,7 @@ xchk_nlinks_compare_inode(* children. */ if (obs.children !=0 ) { -xchk_ino_set_corrupt (sc, ip->i_ino); +xchk_ip_set_corrupt (sc, ip); goto out_corrupt; } }
@@ -770,7 +770,7 @@ xchk_nlinks_compare_inode(* the root directory. */ if (obs.parents !=1 ) { -xchk_ino_set_corrupt (sc, ip->i_ino); +xchk_ip_set_corrupt (sc, ip); goto out_corrupt; } }else if (actual_nlink >0 ) {
@@ -779,7 +779,7 @@ xchk_nlinks_compare_inode(* least one parent. */ if (obs.parents ==0 ) { -xchk_ino_set_corrupt (sc, ip->i_ino); +xchk_ip_set_corrupt (sc, ip); goto out_corrupt; } }
fs/xfs/scrub/parent.c +3 -3
@@ -729,10 +729,10 @@ xchk_parent_count_pptrs( pp->pptrs_found++;if (VFS_I (sc->ip)->i_nlink ==0 && pp->pptrs_found >0 ) -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip);else if (VFS_I (sc->ip)->i_nlink >0 && pp->pptrs_found ==0 ) -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip); }else {/* * Starting with metadir, we allow checking of parent pointers
@@ -743,7 +743,7 @@ xchk_parent_count_pptrs( pp->pptrs_found++;if (VFS_I (sc->ip)->i_nlink != pp->pptrs_found) -xchk_ino_set_corrupt (sc, sc->ip->i_ino); +xchk_ip_set_corrupt (sc, sc->ip); }return 0 ;
fs/xfs/scrub/rtbitmap.c +6 -6
@@ -200,13 +200,13 @@ xchk_rtbitmap(/* Is sb_rextents correct? */ if (mp->m_sb.sb_rextents != rtb->rextents) { -xchk_ino_set_corrupt (sc, rbmip->i_ino); +xchk_ip_set_corrupt (sc, rbmip);return 0 ; }/* Is sb_rextslog correct? */ if (mp->m_sb.sb_rextslog != rtb->rextslog) { -xchk_ino_set_corrupt (sc, rbmip->i_ino); +xchk_ip_set_corrupt (sc, rbmip);return 0 ; }
@@ -215,17 +215,17 @@ xchk_rtbitmap(* case can we exceed 4bn bitmap blocks since the super field is a u32. */ if (rtb->rbmblocks >U32_MAX ) { -xchk_ino_set_corrupt (sc, rbmip->i_ino); +xchk_ip_set_corrupt (sc, rbmip);return 0 ; }if (mp->m_sb.sb_rbmblocks != rtb->rbmblocks) { -xchk_ino_set_corrupt (sc, rbmip->i_ino); +xchk_ip_set_corrupt (sc, rbmip);return 0 ; }/* The bitmap file length must be aligned to an fsblock. */ if (rbmip->i_disk_size & mp->m_blockmask) { -xchk_ino_set_corrupt (sc, rbmip->i_ino); +xchk_ip_set_corrupt (sc, rbmip);return 0 ; }
@@ -235,7 +235,7 @@ xchk_rtbitmap(* file can be larger than sb_rbmblocks. */ if (rbmip->i_disk_size <XFS_FSB_TO_B (mp, rtb->rbmblocks)) { -xchk_ino_set_corrupt (sc, rbmip->i_ino); +xchk_ip_set_corrupt (sc, rbmip);return 0 ; }
fs/xfs/scrub/rtsummary.c +6 -6
@@ -315,25 +315,25 @@ xchk_rtsummary(/* Is sb_rextents correct? */ if (mp->m_sb.sb_rextents != rts->rextents) { -xchk_ino_set_corrupt (sc, rbmip->i_ino); +xchk_ip_set_corrupt (sc, rbmip);return 0 ; }/* Is m_rsumlevels correct? */ if (mp->m_rsumlevels != rts->rsumlevels) { -xchk_ino_set_corrupt (sc, rsumip->i_ino); +xchk_ip_set_corrupt (sc, rsumip);return 0 ; }/* Is m_rsumsize correct? */ if (mp->m_rsumblocks != rts->rsumblocks) { -xchk_ino_set_corrupt (sc, rsumip->i_ino); +xchk_ip_set_corrupt (sc, rsumip);return 0 ; }/* The summary file length must be aligned to an fsblock. */ if (rsumip->i_disk_size & mp->m_blockmask) { -xchk_ino_set_corrupt (sc, rsumip->i_ino); +xchk_ip_set_corrupt (sc, rsumip);return 0 ; }
@@ -343,7 +343,7 @@ xchk_rtsummary(* the file can be larger than rsumsize. */ if (rsumip->i_disk_size <XFS_FSB_TO_B (mp, rts->rsumblocks)) { -xchk_ino_set_corrupt (sc, rsumip->i_ino); +xchk_ip_set_corrupt (sc, rsumip);return 0 ; }
@@ -359,7 +359,7 @@ xchk_rtsummary(* EFSCORRUPTED means the rtbitmap is corrupt, which is an xref * error since we're checking the summary file. */ -xchk_ino_set_corrupt (sc, rbmip->i_ino); +xchk_ip_set_corrupt (sc, rbmip);return 0 ; }if (error)
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 2/2 xfs: rtsummary scrub should treat rtbitmap corruption errors as an xref error
From: "Darrick J. Wong" <[email protected]>
[ Upstream commit 8ed78104722b57df69478b0b1608a408c1036085 ]
LOLLM notes the discrepancy between the comment saying that this is an xref error and the code, which marks a (non-xref) corruption error. This appears to be a regression.
--- fs/xfs/scrub/rtsummary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/scrub/rtsummary.c +1 -1
@@ -359,7 +359,7 @@ xchk_rtsummary(* EFSCORRUPTED means the rtbitmap is corrupt, which is an xref * error since we're checking the summary file. */ -xchk_ip_set_corrupt (sc, rbmip); +xchk_ino_xref_set_corrupt (sc, rbmip->i_ino);return 0 ; }if (error)
Signature · 1 line
2.53.0