Whamcloud - gitweb
b=16517
authoryury <yury>
Sat, 23 Aug 2008 12:15:05 +0000 (12:15 +0000)
committeryury <yury>
Sat, 23 Aug 2008 12:15:05 +0000 (12:15 +0000)
r=nikita,shadow

- fixes printk in portable code.

lustre/fld/fld_cache.c
lustre/ldlm/ldlm_extent.c
lustre/lvfs/lustre_quota_fmt.c
lustre/lvfs/lvfs_linux.c
lustre/lvfs/quotafmt_test.c
lustre/obdclass/class_obd.c
lustre/obdecho/echo.c
lustre/obdecho/echo_client.c
lustre/ptlrpc/gss/gss_internal.h

index 8bf9307..9ec1f1a 100644 (file)
@@ -159,11 +159,11 @@ void fld_cache_fini(struct fld_cache *cache)
                 pct = 0;
         }
 
-        printk("FLD cache statistics (%s):\n", cache->fci_name);
-        printk("  Total reqs: "LPU64"\n", cache->fci_stat.fst_count);
-        printk("  Cache reqs: "LPU64"\n", cache->fci_stat.fst_cache);
-        printk("  Saved RPCs: "LPU64"\n", cache->fci_stat.fst_inflight);
-        printk("  Cache hits: "LPU64"%%\n", pct);
+        CDEBUG(D_INFO, "FLD cache statistics (%s):\n", cache->fci_name);
+        CDEBUG(D_INFO, "  Total reqs: "LPU64"\n", cache->fci_stat.fst_count);
+        CDEBUG(D_INFO, "  Cache reqs: "LPU64"\n", cache->fci_stat.fst_cache);
+        CDEBUG(D_INFO, "  Saved RPCs: "LPU64"\n", cache->fci_stat.fst_inflight);
+        CDEBUG(D_INFO, "  Cache hits: "LPU64"%%\n", pct);
 
        OBD_FREE(cache->fci_hash_table, cache->fci_hash_size *
                 sizeof(*cache->fci_hash_table));
index 86e2ae3..5825ca0 100644 (file)
@@ -134,7 +134,9 @@ static void ldlm_extent_internal_policy_granted(struct ldlm_lock *req,
                         limiter.start = req_start;
 
                 if (interval_is_overlapped(tree->lit_root, &ext))
-                        printk("req_mode = %d, tree->lit_mode = %d, tree->lit_size = %d\n",
+                        CDEBUG(D_INFO, 
+                               "req_mode = %d, tree->lit_mode = %d, "
+                               "tree->lit_size = %d\n",
                                req_mode, tree->lit_mode, tree->lit_size);
                 interval_expand(tree->lit_root, &ext, &limiter);
                 limiter.start = max(limiter.start, ext.start);
index bdf2b50..b0ddb5c 100644 (file)
@@ -120,7 +120,7 @@ int lustre_read_quota_info(struct lustre_quota_info *lqi, int type)
                              sizeof(struct lustre_disk_dqinfo), &offset);
         set_fs(fs);
         if (size != sizeof(struct lustre_disk_dqinfo)) {
-                printk(KERN_WARNING "Can't read info structure on device %s.\n",
+                CDEBUG(D_WARNING, "Can't read info structure on device %s.\n",
                        f->f_vfsmnt->mnt_sb->s_id);
                 return -1;
         }
@@ -156,7 +156,7 @@ int lustre_write_quota_info(struct lustre_quota_info *lqi, int type)
                               sizeof(struct lustre_disk_dqinfo), &offset);
         set_fs(fs);
         if (size != sizeof(struct lustre_disk_dqinfo)) {
-                printk(KERN_WARNING
+                CDEBUG(D_WARNING, 
                        "Can't write info structure on device %s.\n",
                        f->f_vfsmnt->mnt_sb->s_id);
                 return -1;
@@ -194,7 +194,7 @@ static dqbuf_t getdqbuf(void)
 {
         dqbuf_t buf = kmalloc(LUSTRE_DQBLKSIZE, GFP_NOFS);
         if (!buf)
-                printk(KERN_WARNING
+                CDEBUG(D_WARNING, 
                        "VFS: Not enough memory for quota buffers.\n");
         return buf;
 }
@@ -322,7 +322,7 @@ static int remove_free_dqentry(struct file *filp,
         freedqbuf(tmpbuf);
         dh->dqdh_next_free = dh->dqdh_prev_free = cpu_to_le32(0);
         if (write_blk(filp, blk, buf) < 0)      /* No matter whether write succeeds block is out of list */
-                printk(KERN_ERR
+                CDEBUG(D_ERROR, 
                        "VFS: Can't write block (%u) with free entries.\n", blk);
         return 0;
 out_buf:
@@ -399,7 +399,7 @@ static uint find_free_dqentry(struct lustre_dquot *dquot, int *err)
         }
         if (le16_to_cpu(dh->dqdh_entries) + 1 >= LUSTRE_DQSTRINBLK)     /* Block will be full? */
                 if ((*err = remove_free_dqentry(filp, info, buf, blk)) < 0) {
-                        printk(KERN_ERR
+                        CDEBUG(D_ERROR, 
                                "VFS: find_free_dqentry(): Can't remove block (%u) from entry free list.\n",
                                blk);
                         goto out_buf;
@@ -411,14 +411,14 @@ static uint find_free_dqentry(struct lustre_dquot *dquot, int *err)
              memcmp(&fakedquot, ddquot + i, sizeof(fakedquot)); i++) ;
 
         if (i == LUSTRE_DQSTRINBLK) {
-                printk(KERN_ERR
+                CDEBUG(D_ERROR, 
                        "VFS: find_free_dqentry(): Data block full but it shouldn't.\n");
                 *err = -EIO;
                 goto out_buf;
         }
 
         if ((*err = write_blk(filp, blk, buf)) < 0) {
-                printk(KERN_ERR
+                CDEBUG(D_ERROR,
                        "VFS: find_free_dqentry(): Can't write quota data block %u.\n",
                        blk);
                 goto out_buf;
@@ -456,7 +456,7 @@ static int do_insert_tree(struct lustre_dquot *dquot, uint * treeblk, int depth)
                 newact = 1;
         } else {
                 if ((ret = read_blk(filp, *treeblk, buf)) < 0) {
-                        printk(KERN_ERR
+                        CDEBUG(D_ERROR,
                                "VFS: Can't read tree quota block %u.\n",
                                *treeblk);
                         goto out_buf;
@@ -469,7 +469,7 @@ static int do_insert_tree(struct lustre_dquot *dquot, uint * treeblk, int depth)
         if (depth == LUSTRE_DQTREEDEPTH - 1) {
 
                 if (newblk) {
-                        printk(KERN_ERR
+                        CDEBUG(D_ERROR, 
                                "VFS: Inserting already present quota entry (block %u).\n",
                                ref[GETIDINDEX(dquot->dq_id, depth)]);
                         ret = -EIO;
@@ -510,7 +510,7 @@ static int lustre_write_dquot(struct lustre_dquot *dquot)
 
         if (!dquot->dq_off)
                 if ((ret = dq_insert_tree(dquot)) < 0) {
-                        printk(KERN_ERR
+                        CDEBUG(D_ERROR,
                                "VFS: Error %Zd occurred while creating quota.\n",
                                ret);
                         return ret;
@@ -530,7 +530,7 @@ static int lustre_write_dquot(struct lustre_dquot *dquot)
                                 sizeof(struct lustre_disk_dqblk), &offset);
         set_fs(fs);
         if (ret != sizeof(struct lustre_disk_dqblk)) {
-                printk(KERN_WARNING "VFS: dquota write failed on dev %s\n",
+                CDEBUG(D_WARNING, "VFS: dquota write failed on dev %s\n",
                        filp->f_dentry->d_sb->s_id);
                 if (ret >= 0)
                         ret = -ENOSPC;
@@ -553,13 +553,13 @@ static int free_dqentry(struct lustre_dquot *dquot, uint blk)
         if (!buf)
                 return -ENOMEM;
         if (dquot->dq_off >> LUSTRE_DQBLKSIZE_BITS != blk) {
-                printk(KERN_ERR
+                CDEBUG(D_ERROR,
                        "VFS: Quota structure has offset to other block (%u) than it should (%u).\n",
                        blk, (uint) (dquot->dq_off >> LUSTRE_DQBLKSIZE_BITS));
                 goto out_buf;
         }
         if ((ret = read_blk(filp, blk, buf)) < 0) {
-                printk(KERN_ERR "VFS: Can't read quota data block %u\n", blk);
+                CDEBUG(D_ERROR, "VFS: Can't read quota data block %u\n", blk);
                 goto out_buf;
         }
         dh = (struct lustre_disk_dqdbheader *)buf;
@@ -567,7 +567,7 @@ static int free_dqentry(struct lustre_dquot *dquot, uint blk)
         if (!le16_to_cpu(dh->dqdh_entries)) {   /* Block got free? */
                 if ((ret = remove_free_dqentry(filp, info, buf, blk)) < 0 ||
                     (ret = put_free_dqblk(filp, info, buf, blk)) < 0) {
-                        printk(KERN_ERR
+                        CDEBUG(D_ERROR,
                                "VFS: Can't move quota data block (%u) to free list.\n",
                                blk);
                         goto out_buf;
@@ -580,13 +580,13 @@ static int free_dqentry(struct lustre_dquot *dquot, uint blk)
                         /* Insert will write block itself */
                         if ((ret =
                              insert_free_dqentry(filp, info, buf, blk)) < 0) {
-                                printk(KERN_ERR
+                                CDEBUG(D_ERROR,
                                        "VFS: Can't insert quota data block (%u) to free entry list.\n",
                                        blk);
                                 goto out_buf;
                         }
                 } else if ((ret = write_blk(filp, blk, buf)) < 0) {
-                        printk(KERN_ERR
+                        CDEBUG(D_ERROR,
                                "VFS: Can't write quota data block %u\n", blk);
                         goto out_buf;
                 }
@@ -611,7 +611,7 @@ static int remove_tree(struct lustre_dquot *dquot, uint * blk, int depth)
         if (!buf)
                 return -ENOMEM;
         if ((ret = read_blk(filp, *blk, buf)) < 0) {
-                printk(KERN_ERR "VFS: Can't read quota data block %u\n", *blk);
+                CDEBUG(D_ERROR, "VFS: Can't read quota data block %u\n", *blk);
                 goto out_buf;
         }
         newblk = le32_to_cpu(ref[GETIDINDEX(dquot->dq_id, depth)]);
@@ -629,7 +629,7 @@ static int remove_tree(struct lustre_dquot *dquot, uint * blk, int depth)
                         put_free_dqblk(filp, info, buf, *blk);
                         *blk = 0;
                 } else if ((ret = write_blk(filp, *blk, buf)) < 0)
-                        printk(KERN_ERR
+                        CDEBUG(D_ERROR,
                                "VFS: Can't write quota tree block %u.\n", *blk);
         }
 out_buf:
@@ -659,7 +659,7 @@ static loff_t find_block_dqentry(struct lustre_dquot *dquot, uint blk)
         if (!buf)
                 return -ENOMEM;
         if ((ret = read_blk(filp, blk, buf)) < 0) {
-                printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk);
+                CDEBUG(D_ERROR, "VFS: Can't read quota tree block %u.\n", blk);
                 goto out_buf;
         }
         if (dquot->dq_id)
@@ -677,7 +677,7 @@ static loff_t find_block_dqentry(struct lustre_dquot *dquot, uint blk)
                                 break;
         }
         if (i == LUSTRE_DQSTRINBLK) {
-                printk(KERN_ERR
+                CDEBUG(D_ERROR,
                        "VFS: Quota for id %u referenced but not present.\n",
                        dquot->dq_id);
                 ret = -EIO;
@@ -703,7 +703,7 @@ static loff_t find_tree_dqentry(struct lustre_dquot *dquot, uint blk, int depth)
         if (!buf)
                 return -ENOMEM;
         if ((ret = read_blk(filp, blk, buf)) < 0) {
-                printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk);
+                CDEBUG(D_ERROR, "VFS: Can't read quota tree block %u.\n", blk);
                 goto out_buf;
         }
         ret = 0;
@@ -736,14 +736,14 @@ int lustre_read_dquot(struct lustre_dquot *dquot)
 
         /* Invalidated quota? */
         if (!dquot->dq_info || !(filp = dquot->dq_info->qi_files[type])) {
-                printk(KERN_ERR "VFS: Quota invalidated while reading!\n");
+                CDEBUG(D_ERROR, "VFS: Quota invalidated while reading!\n");
                 return -EIO;
         }
 
         offset = find_dqentry(dquot);
         if (offset <= 0) {      /* Entry not present? */
                 if (offset < 0)
-                        printk(KERN_ERR
+                        CDEBUG(D_ERROR,
                                "VFS: Can't read quota structure for id %u.\n",
                                dquot->dq_id);
                 dquot->dq_off = 0;
@@ -760,7 +760,7 @@ int lustre_read_dquot(struct lustre_dquot *dquot)
                     sizeof(struct lustre_disk_dqblk)) {
                         if (ret >= 0)
                                 ret = -EIO;
-                        printk(KERN_ERR
+                        CDEBUG(D_ERROR,
                                "VFS: Error while reading quota structure for id %u.\n",
                                dquot->dq_id);
                         memset(&ddquot, 0, sizeof(struct lustre_disk_dqblk));
@@ -824,7 +824,7 @@ int lustre_init_quota_info(struct lustre_quota_info *lqi, int type)
                                sizeof(struct lustre_disk_dqheader), &offset);
 
         if (size != sizeof(struct lustre_disk_dqheader)) {
-                printk(KERN_ERR "error writing quoafile header (rc:%d)\n", rc);
+                CDEBUG(D_ERROR, "error writing quoafile header (rc:%d)\n", rc);
                 rc = size;
         }
         if (rc)
@@ -876,7 +876,7 @@ static int walk_block_dqentry(struct file *filp, struct inode *inode, int type,
         if (!buf)
                 return -ENOMEM;
         if ((ret = quota_read(filp, inode, type, blk, buf)) < 0) {
-                printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk);
+                CDEBUG(D_ERROR, "VFS: Can't read quota tree block %u.\n", blk);
                 goto out_buf;
         }
         ret = 0;
@@ -924,7 +924,7 @@ static int walk_tree_dqentry(struct file *filp, struct inode *inode, int type,
         if (!buf)
                 return -ENOMEM;
         if ((ret = quota_read(filp, inode, type, blk, buf)) < 0) {
-                printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk);
+                CDEBUG(D_ERROR, "VFS: Can't read quota tree block %u.\n", blk);
                 goto out_buf;
         }
         ret = 0;
@@ -956,18 +956,18 @@ int lustre_get_qids(struct file *fp, struct inode *inode, int type,
         int rc;
 
         if (!check_quota_file(fp, inode, type)) {
-                printk(KERN_ERR "unknown quota file format!\n");
+                CDEBUG(D_ERROR, "unknown quota file format!\n");
                 return -EINVAL;
         }
         if (!list_empty(list)) {
-                printk(KERN_ERR "not empty list\n");
+                CDEBUG(D_ERROR, "not empty list\n");
                 return -EINVAL;
         }
 
         INIT_LIST_HEAD(&blk_list);
         rc = walk_tree_dqentry(fp, inode, type, LUSTRE_DQTREEOFF, 0, &blk_list);
         if (rc) {
-                printk(KERN_ERR "walk through quota file failed!(%d)\n", rc);
+                CDEBUG(D_ERROR, "walk through quota file failed!(%d)\n", rc);
                 goto out_free;
         }
         if (list_empty(&blk_list))
@@ -985,7 +985,7 @@ int lustre_get_qids(struct file *fp, struct inode *inode, int type,
 
                 memset(buf, 0, LUSTRE_DQBLKSIZE);
                 if ((ret = quota_read(fp, inode, type, blk_item->blk, buf))<0) {
-                        printk(KERN_ERR
+                        CDEBUG(D_ERROR,
                                "VFS: Can't read quota tree block %u.\n",
                                blk_item->blk);
                         rc = ret;
index 8dbf9e1..0520730 100644 (file)
@@ -116,17 +116,6 @@ void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx,
         ASSERT_CTXT_MAGIC(new_ctx->magic);
         OBD_SET_CTXT_MAGIC(save);
 
-        /*
-        CDEBUG(D_INFO,
-               "= push %p->%p = cur fs %p pwd %p:d%d:i%d (%.*s), pwdmnt %p:%d\n",
-               save, current, current->fs, current->fs->pwd,
-               atomic_read(&current->fs->pwd->d_count),
-               atomic_read(&current->fs->pwd->d_inode->i_count),
-               current->fs->pwd->d_name.len, current->fs->pwd->d_name.name,
-               current->fs->pwdmnt,
-               atomic_read(&current->fs->pwdmnt->mnt_count));
-        */
-
         save->fs = get_fs();
         LASSERT(atomic_read(&current->fs->pwd->d_count));
         LASSERT(atomic_read(&new_ctx->pwd->d_count));
@@ -161,39 +150,15 @@ void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx,
         current->fs->umask = 0; /* umask already applied on client */
         set_fs(new_ctx->fs);
         ll_set_fs_pwd(current->fs, new_ctx->pwdmnt, new_ctx->pwd);
-
-        /*
-        CDEBUG(D_INFO,
-               "= push %p->%p = cur fs %p pwd %p:d%d:i%d (%.*s), pwdmnt %p:%d\n",
-               new_ctx, current, current->fs, current->fs->pwd,
-               atomic_read(&current->fs->pwd->d_count),
-               atomic_read(&current->fs->pwd->d_inode->i_count),
-               current->fs->pwd->d_name.len, current->fs->pwd->d_name.name,
-               current->fs->pwdmnt,
-               atomic_read(&current->fs->pwdmnt->mnt_count));
-        */
 }
 EXPORT_SYMBOL(push_ctxt);
 
 void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx,
               struct lvfs_ucred *uc)
 {
-        //printk("pc0");
         ASSERT_CTXT_MAGIC(saved->magic);
-        //printk("pc1");
         ASSERT_KERNEL_CTXT("popping non-kernel context!\n");
 
-        /*
-        CDEBUG(D_INFO,
-               " = pop  %p==%p = cur %p pwd %p:d%d:i%d (%.*s), pwdmnt %p:%d\n",
-               new_ctx, current, current->fs, current->fs->pwd,
-               atomic_read(&current->fs->pwd->d_count),
-               atomic_read(&current->fs->pwd->d_inode->i_count),
-               current->fs->pwd->d_name.len, current->fs->pwd->d_name.name,
-               current->fs->pwdmnt,
-               atomic_read(&current->fs->pwdmnt->mnt_count));
-        */
-
         LASSERTF(current->fs->pwd == new_ctx->pwd, "%p != %p\n",
                  current->fs->pwd, new_ctx->pwd);
         LASSERTF(current->fs->pwdmnt == new_ctx->pwdmnt, "%p != %p\n",
@@ -216,17 +181,6 @@ void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx,
                                uc->luc_identity ? uc->luc_identity->mi_ginfo :
                                                   NULL);
         }
-
-        /*
-        CDEBUG(D_INFO,
-               "= pop  %p->%p = cur fs %p pwd %p:d%d:i%d (%.*s), pwdmnt %p:%d\n",
-               saved, current, current->fs, current->fs->pwd,
-               atomic_read(&current->fs->pwd->d_count),
-               atomic_read(&current->fs->pwd->d_inode->i_count),
-               current->fs->pwd->d_name.len, current->fs->pwd->d_name.name,
-               current->fs->pwdmnt,
-               atomic_read(&current->fs->pwdmnt->mnt_count));
-        */
 }
 EXPORT_SYMBOL(pop_ctxt);
 
index 680f93a..b5e0a4b 100644 (file)
@@ -180,13 +180,12 @@ static void print_quota_info(struct lustre_quota_info *lqi)
 
         for (i = 0; i < MAXQUOTAS; i++) {
                 dqinfo = &lqi->qi_info[i];
-                printk("%s quota info:\n", i == USRQUOTA ? "user " : "group");
-                printk
-                    ("dqi_bgrace(%u) dqi_igrace(%u) dqi_flags(%lu) dqi_blocks(%u) "
-                     "dqi_free_blk(%u) dqi_free_entry(%u)\n",
-                     dqinfo->dqi_bgrace, dqinfo->dqi_igrace, dqinfo->dqi_flags,
-                     dqinfo->dqi_blocks, dqinfo->dqi_free_blk,
-                     dqinfo->dqi_free_entry);
+                CDEBUG(D_INFO, "%s quota info:\n", i == USRQUOTA ? "user " : "group");
+                CDEBUG(D_INFO, "dqi_bgrace(%u) dqi_igrace(%u) dqi_flags(%lu) dqi_blocks(%u) "
+                       "dqi_free_blk(%u) dqi_free_entry(%u)\n",
+                       dqinfo->dqi_bgrace, dqinfo->dqi_igrace, dqinfo->dqi_flags,
+                       dqinfo->dqi_blocks, dqinfo->dqi_free_blk,
+                       dqinfo->dqi_free_entry);
         }
 #endif
 }
@@ -398,10 +397,10 @@ static int quotfmt_test_5(struct lustre_quota_info *lqi)
                 list_for_each_entry_safe(dqid, tmp, &list, di_link) {
                         list_del_init(&dqid->di_link);
                         if (rc == 0)
-                                printk("%d ", dqid->di_id);
+                                CDEBUG(D_INFO, "%d ", dqid->di_id);
                         kfree(dqid);
                 }
-                printk("\n");
+                CDEBUG(D_INFO, "\n");
         }
         return rc;
 #else
index 6e2d772..676f155 100644 (file)
@@ -536,18 +536,14 @@ int init_obdclass(void)
 #ifdef __KERNEL__
         int lustre_register_fs(void);
 
-        printk(KERN_INFO "Lustre: OBD class driver, info@clusterfs.com\n");
-        printk(KERN_INFO "        Lustre Version: "LUSTRE_VERSION_STRING"\n");
-        printk(KERN_INFO "        Build Version: "BUILD_VERSION"\n");
-
         for (i = CAPA_SITE_CLIENT; i < CAPA_SITE_MAX; i++)
                 CFS_INIT_LIST_HEAD(&capa_list[i]);
-#else
-        CDEBUG(D_INFO, "Lustre: OBD class driver, info@clusterfs.com\n");
-        CDEBUG(D_INFO, "        Lustre Version: "LUSTRE_VERSION_STRING"\n");
-        CDEBUG(D_INFO, "        Build Version: "BUILD_VERSION"\n");
 #endif
 
+        LCONSOLE_INFO("Lustre: OBD class driver, info@clusterfs.com\n");
+        LCONSOLE_INFO("        Lustre Version: "LUSTRE_VERSION_STRING"\n");
+        LCONSOLE_INFO("        Build Version: "BUILD_VERSION"\n");
+
         spin_lock_init(&obd_types_lock);
         cfs_waitq_init(&obd_race_waitq);
         obd_zombie_impexp_init();
index d692454..f2730d0 100644 (file)
@@ -596,7 +596,7 @@ static int __init obdecho_init(void)
         int rc;
 
         ENTRY;
-        printk(KERN_INFO "Lustre: Echo OBD driver; http://www.lustre.org/\n");
+        LCONSOLE_INFO("Lustre: Echo OBD driver; http://www.lustre.org/\n");
 
         LASSERT(CFS_PAGE_SIZE % OBD_ECHO_BLOCK_SIZE == 0);
 
index 9eee5fb..9d2e968 100644 (file)
@@ -57,16 +57,16 @@ echo_printk_object (char *msg, struct ec_object *eco)
         struct lov_stripe_md *lsm = eco->eco_lsm;
         int                   i;
 
-        printk (KERN_INFO "Lustre: %s: object %p: "LPX64", refs %d%s: "LPX64
+        CDEBUG(D_INFO, "Lustre: %s: object %p: "LPX64", refs %d%s: "LPX64
                 "=%u!%u\n", msg, eco, eco->eco_id, eco->eco_refcount,
                 eco->eco_deleted ? "(deleted) " : "",
                 lsm->lsm_object_id, lsm->lsm_stripe_size,
                 lsm->lsm_stripe_count);
 
         for (i = 0; i < lsm->lsm_stripe_count; i++)
-                printk (KERN_INFO "Lustre:   @%2u:"LPX64"\n",
-                        lsm->lsm_oinfo[i].loi_ost_idx,
-                        lsm->lsm_oinfo[i].loi_id);
+                CDEBUG(D_INFO, "Lustre:   @%2u:"LPX64"\n",
+                       lsm->lsm_oinfo[i].loi_ost_idx,
+                       lsm->lsm_oinfo[i].loi_id);
 }
 #endif
 
index a922afc..4725059 100644 (file)
@@ -504,14 +504,14 @@ void __dbg_memdump(char *name, void *ptr, int size)
 
         OBD_ALLOC(buf, bufsize);
         if (!buf) {
-                printk("DUMP ERROR: can't alloc %d bytes\n", bufsize);
+                CDEBUG(D_ERROR, "DUMP ERROR: can't alloc %d bytes\n", bufsize);
                 return;
         }
 
         for (i = 0; i < size; i++)
                 sprintf(&buf[i+i], "%02x", (__u8) p[i]);
         buf[size + size] = '\0';
-        printk("DUMP %s@%p(%d): %s\n", name, ptr, size, buf);
+        LCONSOLE_INFO("DUMP %s@%p(%d): %s\n", name, ptr, size, buf);
         OBD_FREE(buf, bufsize);
 }