From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84E3B2EB5A6; Sun, 1 Mar 2026 02:01:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772330486; cv=none; b=txy7r0hXY6QwFB9v7o6SvfHri8K9YAFKK+KBbgc+awF5kHxoUXsW7EaQXwAoswlNj7yUraM81WqtPs4OCTmz1vX4982k9LozYAIr0Is8FWtiCUqhOEKmuomnmJ2bDUgGJdYHXVSQBFxBs5oQ+R0KtdEdHs+2d1vCfaaBys/N0nw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772330486; c=relaxed/simple; bh=Z0y4Ydk1PQ98BVyEd/gDud9LGyjcFycOZG4EB5irq4k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uDjdFP2xZ6hv6oN3WpLAfzojMCyXu8mRq0K8d2XiH6sdRLSQUhvo52UJIUNhmANUCgOlXURjSFxA6N3xtvNzfLmj0jYdd0WoaUbv025NhQFF5xfqpUh45cQ59R1vvGj4mPvsevNXRQyhyZ1pEfoo0v7IMrubBLiJpseWaAqkZaM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HqrEwHcr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HqrEwHcr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95337C19424; Sun, 1 Mar 2026 02:01:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772330486; bh=Z0y4Ydk1PQ98BVyEd/gDud9LGyjcFycOZG4EB5irq4k=; h=From:To:Cc:Subject:Date:From; b=HqrEwHcrcoAXlLler9EG7up/qqMk/BGcZ/baA0ZQgwIZMdm77kNyCqaf5OinFj4+L IBUi2ebBpaxh1pNsm+eT6Nt+2vb/GV3bAIeA0uxhiJUy8Gyrvn03V7lVs3B+zxl/Sq wx8P3e6f9rLOnMiiIURHd1/JxrHDHmEroHx3oyM8jnyXRLKfgWKe1IiSg6HprBIsk6 4U3tDxKjlNQ74xSX46lbvqHm2SMF2h4MB8b2DQ+DznWfUjEF030hnBm3T81MvmfWbY qIPRN8boxa/eTVrB9EzAEnMEWZWJepIuhi2gku6bdJ6kVG9VMdY/GgGc2c5NrfOUjc Lf4gAkTgBsY5g== From: Sasha Levin To: stable@vger.kernel.org, djwong@kernel.org Cc: Christoph Hellwig , Carlos Maiolino , linux-xfs@vger.kernel.org Subject: FAILED: Patch "xfs: mark data structures corrupt on EIO and ENODATA" failed to apply to 5.10-stable tree Date: Sat, 28 Feb 2026 21:01:24 -0500 Message-ID: <20260301020124.1728690-1-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-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 . Thanks, Sasha ------------------ original commit in Linus's tree ------------------ >From f39854a3fb2f06dc69b81ada002b641ba5b4696b Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 18 Dec 2025 18:40:50 -0800 Subject: [PATCH] xfs: mark data structures corrupt on EIO and ENODATA I learned a few things this year: first, blk_status_to_errno can return ENODATA for critical media errors; and second, the scrub code doesn't mark data structures as corrupt on ENODATA or EIO. Currently, scrub failing to capture these errors isn't all that impactful -- the checking code will exit to userspace with EIO/ENODATA, and xfs_scrub will log a complaint and exit with nonzero status. Most people treat fsck tools failing as a sign that the fs is corrupt, but online fsck should mark the metadata bad and keep moving. Cc: stable@vger.kernel.org # v4.15 Fixes: 4700d22980d459 ("xfs: create helpers to record and deal with scrub problems") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino --- fs/xfs/scrub/btree.c | 2 ++ fs/xfs/scrub/common.c | 4 ++++ fs/xfs/scrub/dabtree.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/fs/xfs/scrub/btree.c b/fs/xfs/scrub/btree.c index 8ba004979862f..40f36db9f07d5 100644 --- a/fs/xfs/scrub/btree.c +++ b/fs/xfs/scrub/btree.c @@ -42,6 +42,8 @@ __xchk_btree_process_error( break; case -EFSBADCRC: case -EFSCORRUPTED: + case -EIO: + case -ENODATA: /* Note the badness but don't abort. */ sc->sm->sm_flags |= errflag; *error = 0; diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c index 38d0b7d5c894b..affed35a8c96f 100644 --- a/fs/xfs/scrub/common.c +++ b/fs/xfs/scrub/common.c @@ -103,6 +103,8 @@ __xchk_process_error( break; case -EFSBADCRC: case -EFSCORRUPTED: + case -EIO: + case -ENODATA: /* Note the badness but don't abort. */ sc->sm->sm_flags |= errflag; *error = 0; @@ -177,6 +179,8 @@ __xchk_fblock_process_error( break; case -EFSBADCRC: case -EFSCORRUPTED: + case -EIO: + case -ENODATA: /* Note the badness but don't abort. */ sc->sm->sm_flags |= errflag; *error = 0; diff --git a/fs/xfs/scrub/dabtree.c b/fs/xfs/scrub/dabtree.c index dd14f355358ca..5858d4d5e279b 100644 --- a/fs/xfs/scrub/dabtree.c +++ b/fs/xfs/scrub/dabtree.c @@ -45,6 +45,8 @@ xchk_da_process_error( break; case -EFSBADCRC: case -EFSCORRUPTED: + case -EIO: + case -ENODATA: /* Note the badness but don't abort. */ sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; *error = 0; -- 2.51.0