On Mar 21, 2008 00:37 +0300, Andrew Perepechko wrote: > +#define REV_ASSERT(r) BUG_ON((rev) != 0 && (rev) != 1) Umm, "r" and "rev" are not consistent above... Since this assertion is only on the in-memory quota structure, it would probably be better to have something like #define REV_R0 0x12340000 #define REV_R1 0x12340001 and when unpacking the on-disk revision number or it with REV_OFFSET and #define REV_ASSERT(revno) BUG_ON((revno) != REV_R0 && (revno) != REV_R1) That detects the common case of memory being zeroed for some reason. It will also easily detect if you aren't properly swabbing the revision and unmasking the 0x1234000 from the in-memory structure. Just a thought... some people may not like this idea, but I dislike using "0" as a magic number for anything. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html