Linux-XFS Archive on
 help / color / Atom feed
From: "Darrick J. Wong" <>
Subject: [PATCH v4 0/3] xfs: refactor corruption returns
Date: Sun, 10 Nov 2019 17:17:51 -0800
Message-ID: <157343507145.1945685.2940312466469213044.stgit@magnolia> (raw)

Hi all,

This series refactors the code that XFS uses to determine that it is
dealing with corrupt metadata and report that to userspace.

The first patch defines some a couple of new macros to handle testing
and reporting corruption errors.

The next patch replaces the XFS_WANT_CORRUPT* macros with open-coded
versions because it's a little strange that a thing that looks like a
simple function call actually has series effects on code flow.

The third patch cleans up all the "if (bad) { XFS_ERROR_REPORT..." code
by combining that into a single XFS_IS_CORRUPT macro that does all that
logging.  This cleans up the error handling code blocks some more.

This has been lightly tested with fstests.  Enjoy!
Comments and questions are, as always, welcome.


             reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11  1:17 Darrick J. Wong [this message]
2019-11-11  1:17 ` [PATCH 1/3] xfs: add a if_xfs_meta_bad macro for testing and logging bad metadata Darrick J. Wong
2019-11-11 13:51   ` Brian Foster
2019-11-13  0:01     ` Darrick J. Wong
2019-11-11  1:18 ` [PATCH 2/3] xfs: kill the XFS_WANT_CORRUPT_* macros Darrick J. Wong
2019-11-11  8:51   ` Christoph Hellwig
2019-11-12 23:08     ` Darrick J. Wong
2019-11-11  1:18 ` [PATCH 3/3] xfs: convert open coded corruption check to use XFS_IS_CORRUPT Darrick J. Wong

Reply instructions:

You may reply publically 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:

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

  git send-email \
    --in-reply-to=157343507145.1945685.2940312466469213044.stgit@magnolia \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-XFS Archive on

Archives are clonable:
	git clone --mirror linux-xfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-xfs linux-xfs/ \
	public-inbox-index linux-xfs

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone