All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] xfs_db, xfs_repair: improve CRC error detection
@ 2014-04-15  8:24 Dave Chinner
  2014-04-15  8:24 ` [PATCH 1/9] db: don't claim unchecked CRCs are correct Dave Chinner
                   ` (8 more replies)
  0 siblings, 9 replies; 40+ messages in thread
From: Dave Chinner @ 2014-04-15  8:24 UTC (permalink / raw)
  To: xfs

Hi folks,

After a conversion with a user on #IRC this morning, it was clear
that xfs_repair and xfs_db weren't handling metadata blocks with CRC
errors in them particularly well. xfs_metadump was reporting blocks
with errors, but xfs_db was reporting them as having a correct CRC,
which wasn't actually the case - they were unchecked, and the code
saw the absence of error flags as meaning they were good.

Repair had a similar problem - buffers that were prefetched never
had the verifier run on them when they were read by the checking
code as they were uptodate in the cache. Hence the prefetch code
needed to mark the buffers as unchecked so that the code that
checked the metadata ran the verifier and appropriately.

This then showed up the fact that there were many places where
repair was not catching the CRC error and rewriting the buffer to
correct the bad CRC.

This then showed up that we weren't actually handling remote
attribute properly for the CRC enabled format.

And so I fixed all of them. I've verified the code by manually
corrupting blocks with xfs_db by writing garabges into unused
regions of the blocks so that CRC errors are triggered. In each case
repair detected the CRC error and took appropriate action. The CRC
error was not found on a second run of xfs_repair. This really needs
to be turned into a xfstest, but I haven't had time to do that yet.
Any volunteers?

Anyway, these fixes mean we'll definitely need a 3.2.0-rc2 release
in the not too distant future. Comments, flames and testing all
welcome....

-Dave.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 40+ messages in thread
* [PATCH 0/9 V2] xfs_db, xfs_repair: improve CRC error detection
@ 2014-04-24  5:01 Dave Chinner
  2014-04-24  5:01 ` [PATCH 5/9] repair: detect CRC errors in AG headers Dave Chinner
  0 siblings, 1 reply; 40+ messages in thread
From: Dave Chinner @ 2014-04-24  5:01 UTC (permalink / raw)
  To: xfs

Hi folks,

This is version 2 of the patchset first posted here:

http://oss.sgi.com/archives/xfs/2014-04/msg00374.html

The version corrects all the issues mentioned in the first review.
It doesn't try to rework the directory buffer read issue that
Christoph was concerned about - API changes are necessary so we'll
do that through the kernel first in a separate patchset.

Version 2:
- move LIBXFS_B_UNCHECKED to the correct patch (patch 1)
- set_cur_iotype assumes a valid type (patch 2)
- comments added to explain the way LIBXFS_B_UNCHECKED and dirty
  buffers are supposed to interact (patch 3)
- fixed comment flow and added separate "crc_error" return variable
  to dir_read_buf() (patch 4)
- reworked CRC error handling of AG headers (patch 5)
- readded missing dirty/no_modify assert (patch 6)
- fixed typos (patch 8)
- fixed "repair" variable initialisation flow (patch 9)
- fixed dirty buffer accounting on the cursor to dirty the correct
  buffer on CRC errors, added some clarifying comments (patch 9)

Comments and testing welcome!

-Dave.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 40+ messages in thread
* [PATCH 0/9 v3] xfs_db, xfs_repair: improve CRC error detection
@ 2014-04-28 21:04 Dave Chinner
  2014-04-28 21:04 ` [PATCH 5/9] repair: detect CRC errors in AG headers Dave Chinner
  0 siblings, 1 reply; 40+ messages in thread
From: Dave Chinner @ 2014-04-28 21:04 UTC (permalink / raw)
  To: xfs

Hi folks,

This is the third version of the patchset originally posted here:

http://oss.sgi.com/archives/xfs/2014-04/msg00374.html

This version corrects the issues that Christoph commented on in the
second version.

Version 3:
- factored out libxfs_readbuf_verify()
- LIBXFS_B_UNCHECKED flag setting/clearing cleaned up
- cleaned up dirty checks on AG header scan
- cleaned up error path goto stack on AG header scan
- added no_modify check to remote symlink buffer bad CRC rewrite.

Version 2:
- move LIBXFS_B_UNCHECKED to the correct patch (patch 1)
- set_cur_iotype assumes a valid type (patch 2)
- comments added to explain the way LIBXFS_B_UNCHECKED and dirty
  buffers are supposed to interact (patch 3)
- fixed comment flow and added separate "crc_error" return variable
  to dir_read_buf() (patch 4)
- reworked CRC error handling of AG headers (patch 5)
- readded missing dirty/no_modify assert (patch 6)
- fixed typos (patch 8)
- fixed "repair" variable initialisation flow (patch 9)
- fixed dirty buffer accounting on the cursor to dirty the correct
  buffer on CRC errors, added some clarifying comments (patch 9)

Comments and testing welcome!

-Dave.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2014-05-01 23:27 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-15  8:24 [PATCH 0/9] xfs_db, xfs_repair: improve CRC error detection Dave Chinner
2014-04-15  8:24 ` [PATCH 1/9] db: don't claim unchecked CRCs are correct Dave Chinner
2014-04-21  7:00   ` Christoph Hellwig
2014-04-21 23:13     ` Dave Chinner
2014-04-15  8:24 ` [PATCH 2/9] db: verify buffer on type change Dave Chinner
2014-04-21  7:02   ` Christoph Hellwig
2014-04-21 23:14     ` Dave Chinner
2014-04-15  8:24 ` [PATCH 3/9] repair: ensure prefetched buffers have CRCs validated Dave Chinner
2014-04-15 19:40   ` Brian Foster
2014-04-15 21:46     ` Dave Chinner
2014-04-15 22:06       ` Brian Foster
2014-04-16  0:41         ` Dave Chinner
2014-04-15  8:24 ` [PATCH 4/9] repair: detect and correct CRC errors in directory blocks Dave Chinner
2014-04-21  7:08   ` Christoph Hellwig
2014-04-15  8:24 ` [PATCH 5/9] repair: detect CRC errors in AG headers Dave Chinner
2014-04-15 19:40   ` Brian Foster
2014-04-15 21:52     ` Dave Chinner
2014-04-21  7:11   ` Christoph Hellwig
2014-04-21 23:35     ` Dave Chinner
2014-04-22  6:47       ` Christoph Hellwig
2014-04-22  9:10         ` Dave Chinner
2014-04-22  9:41           ` Christoph Hellwig
2014-04-15  8:24 ` [PATCH 6/9] repair: report AG btree verifier errors Dave Chinner
2014-04-15 19:40   ` Brian Foster
2014-04-15 21:53     ` Dave Chinner
2014-04-15  8:24 ` [PATCH 7/9] repair: remove more dirv1 leftovers Dave Chinner
2014-04-16 13:23   ` Brian Foster
2014-04-21  7:14     ` Christoph Hellwig
2014-04-21  7:13   ` Christoph Hellwig
2014-04-15  8:25 ` [PATCH 8/9] repair: handle remote sylmlink CRC errors Dave Chinner
2014-04-16 13:23   ` Brian Foster
2014-04-15  8:25 ` [PATCH 9/9] repair: detect and handle attribute tree " Dave Chinner
2014-04-16 13:25   ` Brian Foster
2014-04-21 23:27     ` Dave Chinner
2014-04-24  5:01 [PATCH 0/9 V2] xfs_db, xfs_repair: improve CRC error detection Dave Chinner
2014-04-24  5:01 ` [PATCH 5/9] repair: detect CRC errors in AG headers Dave Chinner
2014-04-25  5:55   ` Christoph Hellwig
2014-04-28 21:04 [PATCH 0/9 v3] xfs_db, xfs_repair: improve CRC error detection Dave Chinner
2014-04-28 21:04 ` [PATCH 5/9] repair: detect CRC errors in AG headers Dave Chinner
2014-04-29 14:06   ` Brian Foster
2014-05-01 23:27     ` Dave Chinner
2014-04-29 18:16   ` Christoph Hellwig

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.