mbox series

[v4,0/3] xfs: refactor corruption returns

Message ID 157343507145.1945685.2940312466469213044.stgit@magnolia (mailing list archive)
Headers show
Series xfs: refactor corruption returns | expand

Message

Darrick J. Wong Nov. 11, 2019, 1:17 a.m. UTC
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.

--D