Thread (4 messages) 4 messages, 2 authors, 2011-07-24

Re: xfs: encapsulate a block of debug code

From: Christoph Hellwig <hch@infradead.org>
Date: 2011-07-19 17:10:32

On Mon, Jul 18, 2011 at 01:14:09PM -0500, Alex Elder wrote:
quoted hunk ↗ jump to hunk
Pull into a helper function some debug-only code that validates a
xfs_da_blkinfo structure that's been read from disk.

Signed-off-by: Alex Elder <redacted>

---
 fs/xfs/xfs_da_btree.c |   31 ++++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)

Index: b/fs/xfs/xfs_da_btree.c
===================================================================
--- a/fs/xfs/xfs_da_btree.c
+++ b/fs/xfs/xfs_da_btree.c
@@ -692,6 +692,24 @@ xfs_da_join(xfs_da_state_t *state)
 	return(error);
 }
 
+#ifdef	DEBUG
+static void
+xfs_da_blkinfo_validate(struct xfs_da_blkinfo *blkinfo, __u16 level)
I'm not sure the name is a good one.  E.g. the forw/backw pointers
really rely on this node not having any siblings.  Which they shoudn't
have here, but that's not generally true of any blkinfo.

Otherwise looks fine.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help