--- src/sys/vfs/hammer/hammer_cursor.h 2008/05/18 01:48:50 1.19 +++ src/sys/vfs/hammer/hammer_cursor.h 2008/06/07 07:41:51 1.20 @@ -138,3 +138,12 @@ typedef struct hammer_cursor *hammer_cur */ #define HAMMER_CURSOR_INITMASK (~0) +/* + * NOTE: iprec can be NULL, but the address-of does not indirect through + * it so we are ok. + */ +#define hammer_cursor_inmem(cursor) \ + ((cursor)->leaf == &(cursor)->iprec->leaf) +#define hammer_cursor_ondisk(cursor) \ + ((cursor)->leaf != &(cursor)->iprec->leaf) +