All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, chandanbabu@kernel.org, hch@lst.de,
	leo.lilong@huawei.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 6/8] xfs: dump the recovered xattri log item if corruption happens
Date: Sun, 03 Dec 2023 11:02:10 -0800	[thread overview]
Message-ID: <170162989802.3037528.5252429066673340449.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <170162989691.3037528.5056861908451814336.stgit@frogsfrogsfrogs>

From: Darrick J. Wong <djwong@kernel.org>

If xfs_attri_item_recover receives a corruption error when it tries to
finish a recovered log intent item, it should dump the log item for
debugging, just like all the other log intent items.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 fs/xfs/xfs_attr_item.c |    4 ++++
 1 file changed, 4 insertions(+)


diff --git a/fs/xfs/xfs_attr_item.c b/fs/xfs/xfs_attr_item.c
index c4441eacf51c..c7c308d2f897 100644
--- a/fs/xfs/xfs_attr_item.c
+++ b/fs/xfs/xfs_attr_item.c
@@ -666,6 +666,10 @@ xfs_attri_item_recover(
 		xfs_irele(ip);
 		return 0;
 	}
+	if (error == -EFSCORRUPTED)
+		XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp,
+				&attrip->attri_format,
+				sizeof(attrip->attri_format));
 	if (error) {
 		xfs_trans_cancel(tp);
 		goto out_unlock;


  parent reply	other threads:[~2023-12-03 19:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-03 19:00 [PATCHSET v2 0/8] xfs: log intent item recovery should reconstruct defer work state Darrick J. Wong
2023-12-03 19:00 ` [PATCH 1/8] xfs: don't leak recovered attri intent items Darrick J. Wong
2023-12-05  4:31   ` Christoph Hellwig
2023-12-05  5:19     ` Darrick J. Wong
2023-12-03 19:01 ` [PATCH 2/8] xfs: use xfs_defer_pending objects to recover " Darrick J. Wong
2023-12-04  5:03   ` Christoph Hellwig
2023-12-03 19:01 ` [PATCH 3/8] xfs: pass the xfs_defer_pending object to iop_recover Darrick J. Wong
2023-12-04  5:04   ` Christoph Hellwig
2023-12-04 18:31     ` Darrick J. Wong
2023-12-04 19:36       ` Christoph Hellwig
2023-12-03 19:01 ` [PATCH 4/8] xfs: transfer recovered intent item ownership in ->iop_recover Darrick J. Wong
2023-12-03 19:01 ` [PATCH 5/8] xfs: recreate work items when recovering intent items Darrick J. Wong
2023-12-04  5:05   ` Christoph Hellwig
2023-12-03 19:02 ` Darrick J. Wong [this message]
2023-12-04  5:05   ` [PATCH 6/8] xfs: dump the recovered xattri log item if corruption happens Christoph Hellwig
2023-12-03 19:02 ` [PATCH 7/8] xfs: use xfs_defer_finish_one to finish recovered work items Darrick J. Wong
2023-12-04  5:06   ` Christoph Hellwig
2023-12-03 19:02 ` [PATCH 8/8] xfs: move ->iop_recover to xfs_defer_op_type Darrick J. Wong
2023-12-04 19:05   ` [PATCH v2.1 " Darrick J. Wong
2023-12-07  2:22 [PATCHSET v3 0/8] xfs: log intent item recovery should reconstruct defer work state Darrick J. Wong
2023-12-07  2:24 ` [PATCH 6/8] xfs: dump the recovered xattri log item if corruption happens Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=170162989802.3037528.5252429066673340449.stgit@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=chandanbabu@kernel.org \
    --cc=hch@lst.de \
    --cc=leo.lilong@huawei.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.