On Mon, 30 Nov 2009, Alex Elder wrote:
Justin Piszcz wrote:
Hi,
I wanted to compile my kernel with DEBUG for XFS and also kernel frame pointers
to catch any issues.
However, DEBUG for XFS does more harm than good?
It should not. This simple patch would improve things
but I'll add to my to-do list a review of assertions
to find and fix things of this type.
-Alex
diff -Naur old/fs/xfs/xfs_bmap.c new/fs/xfs/xfs_bmap.c
--- old/fs/xfs/xfs_bmap.c 2009-11-30 07:55:59.000000000 -0600
+++ new/fs/xfs/xfs_bmap.c 2009-11-30 07:56:43.000000000 -0600
@@ -4843,6 +4843,7 @@
orig_mval = mval;
orig_nmap = *nmap;
#endif
+ ASSERT(nmap != NULL);
ASSERT(*nmap >= 1);
ASSERT(*nmap <= XFS_BMAP_MAX_NMAP || !(flags & XFS_BMAPI_WRITE));
whichfork = (flags & XFS_BMAPI_ATTRFORK) ?
The patch failed against 2.6.31.6 but I added that line at that point anyway,
ok thanks will let you know if I see anything else with DEBUG enabled.
Justin.
|