From 8c101659b2be6eecd398c41cf73634ef35b61c85 Mon Sep 17 00:00:00 2001 From: green Date: Sat, 28 May 2005 21:31:08 +0000 Subject: [PATCH] Branch: b1_4 Instead of commenting out all LL_CDEBUG_PAGE usage, make LL_CDEBUG_PAGE to work both in kernel and not. --- lustre/include/linux/lustre_debug.h | 6 ++++++ lustre/osc/osc_request.c | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lustre/include/linux/lustre_debug.h b/lustre/include/linux/lustre_debug.h index 1ca2d89..e550272 100644 --- a/lustre/include/linux/lustre_debug.h +++ b/lustre/include/linux/lustre_debug.h @@ -42,10 +42,16 @@ do { if (offset > ASSERT_MAX_SIZE_MB << 20) { \ 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); diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index c8a3a53..f0d67de 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -730,10 +730,8 @@ static obd_count osc_checksum_bulk(int nob, obd_count pg_count, cksum = crc32_le(cksum, ptr + off, count); kunmap(pga->pg); -#ifdef __KERNEL__ LL_CDEBUG_PAGE(D_PAGE, pga->pg, "off %d checksum %x\n", off, cksum); -#endif nob -= pga->count; pg_count--; -- 1.8.3.1