Whamcloud - gitweb
- many changes about fids:
[fs/lustre-release.git] / lustre / include / linux / lustre_debug.h
index 669c0e8..a554739 100644 (file)
@@ -30,7 +30,7 @@
 do { if (index > ASSERT_MAX_SIZE_MB << (20 - PAGE_SHIFT)) {             \
         CERROR("bad page index %lu > %Lu\n", index,                     \
                ASSERT_MAX_SIZE_MB << (20 - PAGE_SHIFT));                \
-        portal_debug = ~0UL;                                            \
+        libcfs_debug = ~0UL;                                            \
         OP;                                                             \
 }} while(0)
 
@@ -38,16 +38,28 @@ do { if (index > ASSERT_MAX_SIZE_MB << (20 - PAGE_SHIFT)) {             \
 do { if (offset > ASSERT_MAX_SIZE_MB << 20) {                           \
         CERROR("bad file offset %Lu > %Lu\n", offset,                   \
                ASSERT_MAX_SIZE_MB << 20);                               \
-        portal_debug = ~0UL;                                            \
+        libcfs_debug = ~0UL;                                            \
         OP;                                                             \
 }} while(0)
 
+#ifdef __KERNEL__
+#define LL_CDEBUG_PAGE(mask, page, fmt, arg...)                               \
+        CDEBUG(mask, "page %p map %p index %lu flags %lx count %u priv %0lx: "\
+               fmt, page, page->mapping, page->index, (long)page->flags,      \
+               page_count(page), page->private, ## arg)
+#else
+#define LL_CDEBUG_PAGE(mask, page, fmt, arg...)                               \
+        CDEBUG(mask, "page %p index %lu priv %0lx: "\
+               fmt, page, page->index, page->private, ## arg)
+#endif
+
 /* lib/debug.c */
 int dump_lniobuf(struct niobuf_local *lnb);
 int dump_rniobuf(struct niobuf_remote *rnb);
 int dump_ioo(struct obd_ioobj *nb);
 int dump_req(struct ptlrpc_request *req);
 int dump_obdo(struct obdo *oa);
+void dump_lsm(int level, struct lov_stripe_md *lsm);
 int block_debug_setup(void *addr, int len, __u64 off, __u64 id);
 int block_debug_check(char *who, void *addr, int len, __u64 off, __u64 id);
 #endif