Whamcloud - gitweb
LU-4871 newline: Correct missing newline 00/10000/6
authorJames Nunez <james.a.nunez@intel.com>
Thu, 17 Apr 2014 20:29:01 +0000 (14:29 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 9 Jul 2014 15:27:10 +0000 (15:27 +0000)
Several error messages are missing newline characters
at the end of the message. Newlines are added where
necessary and other minor corrections; no punctuation
at the end of an error message, add a return code to
the end of error messages, device name at the beginning,
etc.

There are just a couple of places where newlines are
removed and this is only in LDLM_DEBUG_NOLOCK. The definition
of LDLM_DEBUG_NOLOCK already has a newline in it and
resulted in double newlines printed.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I562a76a03753cfc8fd7bb822713280995d9cce45
Reviewed-on: http://review.whamcloud.com/10000
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
36 files changed:
lnet/selftest/framework.c
lnet/selftest/rpc.c
lustre/ldlm/ldlm_request.c
lustre/llite/file.c
lustre/lmv/lmv_obd.c
lustre/lod/lod_pool.c
lustre/lov/lov_lock.c
lustre/lov/lov_obd.c
lustre/lov/lov_pool.c
lustre/mdc/mdc_request.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_hsm_cdt_actions.c
lustre/mdt/mdt_lib.c
lustre/mgc/mgc_request.c
lustre/obdclass/cl_lock.c
lustre/obdclass/llog_test.c
lustre/obdclass/lprocfs_jobstats.c
lustre/obdclass/lprocfs_status.c
lustre/obdclass/lu_object.c
lustre/obdclass/obd_config.c
lustre/obdecho/echo_client.c
lustre/osc/osc_cache.c
lustre/osc/osc_lock.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_iam_lvar.c
lustre/osd-ldiskfs/osd_io.c
lustre/osp/osp_dev.c
lustre/ptlrpc/client.c
lustre/ptlrpc/sec.c
lustre/quota/lquota_disk.c
lustre/quota/qsd_handler.c
lustre/quota/qsd_lock.c
lustre/quota/qsd_request.c
lustre/quota/qsd_writeback.c
lustre/utils/lustre_cfg.c

index 45a926a..eae145c 100644 (file)
@@ -479,12 +479,12 @@ sfw_make_session(srpc_mksn_reqst_t *request, srpc_mksn_reply_t *reply)
                return 0;
        }
 
                return 0;
        }
 
-        /* brand new or create by force */
-        LIBCFS_ALLOC(sn, sizeof(sfw_session_t));
-        if (sn == NULL) {
-                CERROR ("Dropping RPC (mksn) under memory pressure.\n");
-                return -ENOMEM;
-        }
+       /* brand new or create by force */
+       LIBCFS_ALLOC(sn, sizeof(sfw_session_t));
+       if (sn == NULL) {
+               CERROR("dropping RPC mksn under memory pressure\n");
+               return -ENOMEM;
+       }
 
        sfw_init_session(sn, request->mksn_sid,
                         msg->msg_ses_feats, &request->mksn_name[0]);
 
        sfw_init_session(sn, request->mksn_sid,
                         msg->msg_ses_feats, &request->mksn_name[0]);
@@ -1186,9 +1186,9 @@ sfw_add_test (srpc_server_rpc_t *rpc)
                 return 0;
         }
 
                 return 0;
         }
 
-        bat = sfw_bid2batch(request->tsr_bid);
-        if (bat == NULL) {
-                CERROR ("Dropping RPC (%s) from %s under memory pressure.\n",
+       bat = sfw_bid2batch(request->tsr_bid);
+       if (bat == NULL) {
+               CERROR("dropping RPC %s from %s under memory pressure\n",
                        rpc->srpc_scd->scd_svc->sv_name,
                         libcfs_id2str(rpc->srpc_peer));
                 return -ENOMEM;
                        rpc->srpc_scd->scd_svc->sv_name,
                         libcfs_id2str(rpc->srpc_peer));
                 return -ENOMEM;
@@ -1288,7 +1288,7 @@ sfw_handle_server_rpc(struct srpc_server_rpc *rpc)
 
        /* Remove timer to avoid racing with it or expiring active session */
        if (sfw_del_session_timer() != 0) {
 
        /* Remove timer to avoid racing with it or expiring active session */
        if (sfw_del_session_timer() != 0) {
-               CERROR("Dropping RPC (%s) from %s: racing with expiry timer.",
+               CERROR("dropping RPC %s from %s: racing with expiry timer\n",
                       sv->sv_name, libcfs_id2str(rpc->srpc_peer));
                spin_unlock(&sfw_data.fw_lock);
                return -EAGAIN;
                       sv->sv_name, libcfs_id2str(rpc->srpc_peer));
                spin_unlock(&sfw_data.fw_lock);
                return -EAGAIN;
@@ -1405,7 +1405,7 @@ sfw_bulk_ready(struct srpc_server_rpc *rpc, int status)
        }
 
        if (sfw_del_session_timer() != 0) {
        }
 
        if (sfw_del_session_timer() != 0) {
-               CERROR("Dropping RPC (%s) from %s: racing with expiry timer",
+               CERROR("dropping RPC %s from %s: racing with expiry timer\n",
                       sv->sv_name, libcfs_id2str(rpc->srpc_peer));
                spin_unlock(&sfw_data.fw_lock);
                return -EAGAIN;
                       sv->sv_name, libcfs_id2str(rpc->srpc_peer));
                spin_unlock(&sfw_data.fw_lock);
                return -EAGAIN;
index a2573b2..9337435 100644 (file)
@@ -700,8 +700,8 @@ srpc_finish_service(struct srpc_service *sv)
                }
 
                if (scd->scd_buf_nposted > 0) {
                }
 
                if (scd->scd_buf_nposted > 0) {
-                       CDEBUG(D_NET, "waiting for %d posted buffers to unlink",
-                              scd->scd_buf_nposted);
+                       CDEBUG(D_NET, "waiting for %d posted buffers to "
+                              "unlink\n", scd->scd_buf_nposted);
                        spin_unlock(&scd->scd_lock);
                        return 0;
                }
                        spin_unlock(&scd->scd_lock);
                        return 0;
                }
index 76f329d..0fa66b0 100644 (file)
@@ -1353,12 +1353,12 @@ int ldlm_cli_cancel(struct lustre_handle *lockh,
 
         /* concurrent cancels on the same handle can happen */
         lock = ldlm_handle2lock_long(lockh, LDLM_FL_CANCELING);
 
         /* concurrent cancels on the same handle can happen */
         lock = ldlm_handle2lock_long(lockh, LDLM_FL_CANCELING);
-        if (lock == NULL) {
-                LDLM_DEBUG_NOLOCK("lock is already being destroyed\n");
-                RETURN(0);
-        }
+       if (lock == NULL) {
+               LDLM_DEBUG_NOLOCK("lock is already being destroyed");
+               RETURN(0);
+       }
 
 
-        rc = ldlm_cli_cancel_local(lock);
+       rc = ldlm_cli_cancel_local(lock);
        if (rc == LDLM_FL_LOCAL_ONLY || cancel_flags & LCF_LOCAL) {
                LDLM_LOCK_RELEASE(lock);
                RETURN(0);
        if (rc == LDLM_FL_LOCAL_ONLY || cancel_flags & LCF_LOCAL) {
                LDLM_LOCK_RELEASE(lock);
                RETURN(0);
index 33c8e74..6582be3 100644 (file)
@@ -334,10 +334,11 @@ static int ll_md_close(struct obd_export *md_exp, struct inode *inode,
                         rc = ll_md_real_close(file->f_dentry->d_inode,
                                               fd->fd_omode);
                 }
                         rc = ll_md_real_close(file->f_dentry->d_inode,
                                               fd->fd_omode);
                 }
-        } else {
-                CERROR("Releasing a file %p with negative dentry %p. Name %s",
-                       file, file->f_dentry, file->f_dentry->d_name.name);
-        }
+       } else {
+               CERROR("released file has negative dentry: file = %p, "
+                      "dentry = %p, name = %s\n",
+                      file, file->f_dentry, file->f_dentry->d_name.name);
+       }
 
 out:
        LUSTRE_FPRIVATE(file) = NULL;
 
 out:
        LUSTRE_FPRIVATE(file) = NULL;
@@ -976,11 +977,11 @@ static int ll_lsm_getattr(struct lov_stripe_md *lsm, struct obd_export *exp,
                        oinfo.oi_oa->o_flags |= OBD_FL_FLUSH;
        }
 
                        oinfo.oi_oa->o_flags |= OBD_FL_FLUSH;
        }
 
-        set = ptlrpc_prep_set();
-        if (set == NULL) {
-                CERROR("can't allocate ptlrpc set\n");
-                rc = -ENOMEM;
-        } else {
+       set = ptlrpc_prep_set();
+       if (set == NULL) {
+               CERROR("cannot allocate ptlrpc set: rc = %d\n", -ENOMEM);
+               rc = -ENOMEM;
+       } else {
                 rc = obd_getattr_async(exp, &oinfo, set);
                 if (rc == 0)
                         rc = ptlrpc_set_wait(set);
                 rc = obd_getattr_async(exp, &oinfo, set);
                 if (rc == 0)
                         rc = ptlrpc_set_wait(set);
@@ -1216,7 +1217,7 @@ out:
                CDEBUG(D_VFSTRACE, "Restart %s on %s from %lld, count:%zd\n",
                       iot == CIT_READ ? "read" : "write",
                       file->f_dentry->d_name.name, *ppos, count);
                CDEBUG(D_VFSTRACE, "Restart %s on %s from %lld, count:%zd\n",
                       iot == CIT_READ ? "read" : "write",
                       file->f_dentry->d_name.name, *ppos, count);
-               LASSERTF(io->ci_nob == 0, "%zd", io->ci_nob);
+               LASSERTF(io->ci_nob == 0, "%zd\n", io->ci_nob);
                goto restart;
        }
 
                goto restart;
        }
 
@@ -3893,7 +3894,7 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, ldlm_mode_t mode,
        LASSERT(lock != NULL);
        LASSERT(ldlm_has_layout(lock));
 
        LASSERT(lock != NULL);
        LASSERT(ldlm_has_layout(lock));
 
-       LDLM_DEBUG(lock, "file "DFID"(%p) being reconfigured: %d\n",
+       LDLM_DEBUG(lock, "file "DFID"(%p) being reconfigured: %d",
                   PFID(&lli->lli_fid), inode, reconf);
 
        /* in case this is a caching lock and reinstate with new inode */
                   PFID(&lli->lli_fid), inode, reconf);
 
        /* in case this is a caching lock and reinstate with new inode */
@@ -4048,7 +4049,7 @@ again:
        it.it_op = IT_LAYOUT;
        lockh.cookie = 0ULL;
 
        it.it_op = IT_LAYOUT;
        lockh.cookie = 0ULL;
 
-       LDLM_DEBUG_NOLOCK("%s: requeue layout lock for file "DFID"(%p)\n",
+       LDLM_DEBUG_NOLOCK("%s: requeue layout lock for file "DFID"(%p)",
                          ll_get_fsname(inode->i_sb, NULL, 0),
                          PFID(&lli->lli_fid), inode);
 
                          ll_get_fsname(inode->i_sb, NULL, 0),
                          PFID(&lli->lli_fid), inode);
 
index c1a5d20..d18b856 100644 (file)
@@ -303,8 +303,10 @@ static int lmv_connect(const struct lu_env *env,
                                                        obd->obd_proc_entry,
                                                        NULL, NULL);
                if (IS_ERR(lmv->targets_proc_entry)) {
                                                        obd->obd_proc_entry,
                                                        NULL, NULL);
                if (IS_ERR(lmv->targets_proc_entry)) {
-                       CERROR("could not register /proc/fs/lustre/%s/%s/target_obds.",
-                              obd->obd_type->typ_name, obd->obd_name);
+                       CERROR("%s: cannot register "
+                              "/proc/fs/lustre/%s/%s/target_obds\n",
+                              obd->obd_name, obd->obd_type->typ_name,
+                              obd->obd_name);
                        lmv->targets_proc_entry = NULL;
                }
        }
                        lmv->targets_proc_entry = NULL;
                }
        }
@@ -390,7 +392,7 @@ static int lmv_init_ea_size(struct obd_export *exp, int easize,
                                     cookiesize, def_cookiesize);
                if (rc) {
                        CERROR("%s: obd_init_ea_size() failed on MDT target %d:"
                                     cookiesize, def_cookiesize);
                if (rc) {
                        CERROR("%s: obd_init_ea_size() failed on MDT target %d:"
-                              " rc = %d.\n", obd->obd_name, i, rc);
+                              " rc = %d\n", obd->obd_name, i, rc);
                        break;
                }
        }
                        break;
                }
        }
@@ -490,8 +492,8 @@ int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt)
                                                  mdc_obd->obd_type->typ_name,
                                                  mdc_obd->obd_name);
                if (mdc_symlink == NULL) {
                                                  mdc_obd->obd_type->typ_name,
                                                  mdc_obd->obd_name);
                if (mdc_symlink == NULL) {
-                       CERROR("Could not register LMV target "
-                              "/proc/fs/lustre/%s/%s/target_obds/%s.",
+                       CERROR("cannot register LMV target "
+                              "/proc/fs/lustre/%s/%s/target_obds/%s\n",
                               obd->obd_type->typ_name, obd->obd_name,
                               mdc_obd->obd_name);
                }
                               obd->obd_type->typ_name, obd->obd_name,
                               mdc_obd->obd_name);
                }
index 75011d9..f1a8059 100644 (file)
@@ -175,7 +175,7 @@ static void *pool_proc_next(struct seq_file *s, void *v, loff_t *pos)
        struct lod_pool_iterator *iter = s->private;
        int prev_idx;
 
        struct lod_pool_iterator *iter = s->private;
        int prev_idx;
 
-       LASSERTF(iter->lpi_magic == POOL_IT_MAGIC, "%08X", iter->lpi_magic);
+       LASSERTF(iter->lpi_magic == POOL_IT_MAGIC, "%08X\n", iter->lpi_magic);
 
        /* test if end of file */
        if (*pos >= pool_tgt_count(iter->lpi_pool))
 
        /* test if end of file */
        if (*pos >= pool_tgt_count(iter->lpi_pool))
@@ -256,7 +256,7 @@ static int pool_proc_show(struct seq_file *s, void *v)
        struct lod_pool_iterator *iter = v;
        struct lod_tgt_desc  *osc_desc;
 
        struct lod_pool_iterator *iter = v;
        struct lod_tgt_desc  *osc_desc;
 
-       LASSERTF(iter->lpi_magic == POOL_IT_MAGIC, "%08X", iter->lpi_magic);
+       LASSERTF(iter->lpi_magic == POOL_IT_MAGIC, "%08X\n", iter->lpi_magic);
        LASSERT(iter->lpi_pool != NULL);
        LASSERT(iter->lpi_idx <= pool_tgt_count(iter->lpi_pool));
 
        LASSERT(iter->lpi_pool != NULL);
        LASSERT(iter->lpi_idx <= pool_tgt_count(iter->lpi_pool));
 
index 55df897..1d1d980 100644 (file)
@@ -270,7 +270,7 @@ static int lov_subresult(int result, int rc)
         ENTRY;
 
        LASSERTF(result <= 0 || result == CLO_REPEAT || result == CLO_WAIT,
         ENTRY;
 
        LASSERTF(result <= 0 || result == CLO_REPEAT || result == CLO_WAIT,
-                "result = %d", result);
+                "result = %d\n", result);
        LASSERTF(rc <= 0 || rc == CLO_REPEAT || rc == CLO_WAIT,
                 "rc = %d\n", rc);
         CLASSERT(CLO_WAIT < CLO_REPEAT);
        LASSERTF(rc <= 0 || rc == CLO_REPEAT || rc == CLO_WAIT,
                 "rc = %d\n", rc);
         CLASSERT(CLO_WAIT < CLO_REPEAT);
index 3c25cb8..7bacb3f 100644 (file)
@@ -206,13 +206,13 @@ int lov_connect_obd(struct obd_device *obd, __u32 index, int activate,
                                                  osc_obd->obd_type->typ_name,
                                                  osc_obd->obd_name);
                if (osc_symlink == NULL) {
                                                  osc_obd->obd_type->typ_name,
                                                  osc_obd->obd_name);
                if (osc_symlink == NULL) {
-                       CERROR("could not register LOV target "
-                              "/proc/fs/lustre/%s/%s/target_obds/%s.",
+                       CERROR("cannot register LOV target "
+                              "/proc/fs/lustre/%s/%s/target_obds/%s\n",
                               obd->obd_type->typ_name, obd->obd_name,
                               osc_obd->obd_name);
                               obd->obd_type->typ_name, obd->obd_name,
                               osc_obd->obd_name);
-                }
-        }
-        RETURN(0);
+               }
+       }
+       RETURN(0);
 }
 
 static int lov_connect(const struct lu_env *env,
 }
 
 static int lov_connect(const struct lu_env *env,
@@ -246,7 +246,8 @@ static int lov_connect(const struct lu_env *env,
                                                       obd->obd_proc_entry,
                                                       NULL, NULL);
        if (IS_ERR(lov->targets_proc_entry)) {
                                                       obd->obd_proc_entry,
                                                       NULL, NULL);
        if (IS_ERR(lov->targets_proc_entry)) {
-               CERROR("%s: could not register /proc/fs/lustre/%s/%s/target_obds.",
+               CERROR("%s: cannot register "
+                      "/proc/fs/lustre/%s/%s/target_obds\n",
                       obd->obd_name, obd->obd_type->typ_name, obd->obd_name);
                lov->targets_proc_entry = NULL;
        }
                       obd->obd_name, obd->obd_type->typ_name, obd->obd_name);
                lov->targets_proc_entry = NULL;
        }
@@ -440,13 +441,14 @@ static int lov_set_osc_active(struct obd_device *obd, struct obd_uuid *uuid,
                         lov->desc.ld_active_tgt_count--;
                         lov->lov_tgts[index]->ltd_exp->exp_obd->obd_inactive = 1;
                 }
                         lov->desc.ld_active_tgt_count--;
                         lov->lov_tgts[index]->ltd_exp->exp_obd->obd_inactive = 1;
                 }
-        } else {
-                CERROR("Unknown event(%d) for uuid %s", ev, uuid->uuid);
-        }
+       } else {
+               CERROR("%s: unknown event %d for uuid %s\n", obd->obd_name,
+                      ev, uuid->uuid);
+       }
 
  out:
 
  out:
-        obd_putref(obd);
-        RETURN(index);
+       obd_putref(obd);
+       RETURN(index);
 }
 
 static int lov_notify(struct obd_device *obd, struct obd_device *watched,
 }
 
 static int lov_notify(struct obd_device *obd, struct obd_device *watched,
@@ -2297,9 +2299,10 @@ static int lov_quotactl(struct obd_device *obd, struct obd_export *exp,
             oqctl->qc_cmd != Q_INITQUOTA &&
             oqctl->qc_cmd != LUSTRE_Q_SETQUOTA &&
             oqctl->qc_cmd != Q_FINVALIDATE) {
             oqctl->qc_cmd != Q_INITQUOTA &&
             oqctl->qc_cmd != LUSTRE_Q_SETQUOTA &&
             oqctl->qc_cmd != Q_FINVALIDATE) {
-                CERROR("bad quota opc %x for lov obd", oqctl->qc_cmd);
-                RETURN(-EFAULT);
-        }
+               CERROR("%s: bad quota opc %x for lov obd\n",
+                      obd->obd_name, oqctl->qc_cmd);
+               RETURN(-EFAULT);
+       }
 
         /* for lov tgt */
         obd_getref(obd);
 
         /* for lov tgt */
         obd_getref(obd);
index a33e90d..4557bdb 100644 (file)
@@ -180,7 +180,7 @@ static void *pool_proc_next(struct seq_file *s, void *v, loff_t *pos)
         struct pool_iterator *iter = (struct pool_iterator *)s->private;
         int prev_idx;
 
         struct pool_iterator *iter = (struct pool_iterator *)s->private;
         int prev_idx;
 
-        LASSERTF(iter->magic == POOL_IT_MAGIC, "%08X", iter->magic);
+       LASSERTF(iter->magic == POOL_IT_MAGIC, "%08X\n", iter->magic);
 
         /* test if end of file */
         if (*pos >= pool_tgt_count(iter->pool))
 
         /* test if end of file */
         if (*pos >= pool_tgt_count(iter->pool))
@@ -261,9 +261,9 @@ static int pool_proc_show(struct seq_file *s, void *v)
         struct pool_iterator *iter = (struct pool_iterator *)v;
         struct lov_tgt_desc *tgt;
 
         struct pool_iterator *iter = (struct pool_iterator *)v;
         struct lov_tgt_desc *tgt;
 
-        LASSERTF(iter->magic == POOL_IT_MAGIC, "%08X", iter->magic);
-        LASSERT(iter->pool != NULL);
-        LASSERT(iter->idx <= pool_tgt_count(iter->pool));
+       LASSERTF(iter->magic == POOL_IT_MAGIC, "%08X\n", iter->magic);
+       LASSERT(iter->pool != NULL);
+       LASSERT(iter->idx <= pool_tgt_count(iter->pool));
 
        down_read(&pool_tgt_rw_sem(iter->pool));
         tgt = pool_tgt(iter->pool, iter->idx);
 
        down_read(&pool_tgt_rw_sem(iter->pool));
         tgt = pool_tgt(iter->pool, iter->idx);
index 4bee7c2..9a38ea3 100644 (file)
@@ -1339,7 +1339,7 @@ static void mdc_adjust_dirpages(struct page **pages, int cfs_pgs, int lu_pgs)
 
                kunmap(pages[i]);
        }
 
                kunmap(pages[i]);
        }
-       LASSERTF(lu_pgs == 0, "left = %d", lu_pgs);
+       LASSERTF(lu_pgs == 0, "left = %d\n", lu_pgs);
 }
 #else
 #define mdc_adjust_dirpages(pages, cfs_pgs, lu_pgs) do {} while (0)
 }
 #else
 #define mdc_adjust_dirpages(pages, cfs_pgs, lu_pgs) do {} while (0)
@@ -2347,7 +2347,8 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
         ENTRY;
 
        if (!try_module_get(THIS_MODULE)) {
         ENTRY;
 
        if (!try_module_get(THIS_MODULE)) {
-               CERROR("Can't get module. Is it alive?");
+               CERROR("%s: cannot get module '%s'\n", obd->obd_name,
+                      module_name(THIS_MODULE));
                return -EINVAL;
        }
         switch (cmd) {
                return -EINVAL;
        }
         switch (cmd) {
index f64795f..1ef1862 100644 (file)
@@ -1899,19 +1899,20 @@ static int mdt_device_sync(const struct lu_env *env, struct mdt_device *mdt)
 /* this should sync this object */
 static int mdt_object_sync(struct mdt_thread_info *info)
 {
 /* this should sync this object */
 static int mdt_object_sync(struct mdt_thread_info *info)
 {
-        struct md_object *next;
-        int rc;
-        ENTRY;
+       struct md_object *next;
+       int rc;
+       ENTRY;
 
 
-        if (!mdt_object_exists(info->mti_object)) {
-                CWARN("Non existing object  "DFID"!\n",
-                      PFID(mdt_object_fid(info->mti_object)));
-                RETURN(-ESTALE);
-        }
-        next = mdt_object_child(info->mti_object);
-        rc = mo_object_sync(info->mti_env, next);
+       if (!mdt_object_exists(info->mti_object)) {
+               CWARN("%s: non existing object "DFID": rc = %d\n",
+                     mdt_obd_name(info->mti_mdt),
+                     PFID(mdt_object_fid(info->mti_object)), -ESTALE);
+               RETURN(-ESTALE);
+       }
+       next = mdt_object_child(info->mti_object);
+       rc = mo_object_sync(info->mti_env, next);
 
 
-        RETURN(rc);
+       RETURN(rc);
 }
 
 static int mdt_sync(struct tgt_session_info *tsi)
 }
 
 static int mdt_sync(struct tgt_session_info *tsi)
@@ -2195,12 +2196,13 @@ struct mdt_object *mdt_object_find(const struct lu_env *env,
 static void mdt_device_commit_async(const struct lu_env *env,
                                     struct mdt_device *mdt)
 {
 static void mdt_device_commit_async(const struct lu_env *env,
                                     struct mdt_device *mdt)
 {
-        struct dt_device *dt = mdt->mdt_bottom;
-        int rc;
+       struct dt_device *dt = mdt->mdt_bottom;
+       int rc;
 
 
-        rc = dt->dd_ops->dt_commit_async(env, dt);
-        if (unlikely(rc != 0))
-                CWARN("async commit start failed with rc = %d", rc);
+       rc = dt->dd_ops->dt_commit_async(env, dt);
+       if (unlikely(rc != 0))
+               CWARN("%s: async commit start failed: rc = %d\n",
+                     mdt_obd_name(mdt), rc);
 }
 
 /**
 }
 
 /**
@@ -2275,10 +2277,11 @@ int mdt_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
         if (lock->l_req_mode == LCK_COS && lock->l_blocking_lock != NULL) {
                 struct lu_env env;
 
         if (lock->l_req_mode == LCK_COS && lock->l_blocking_lock != NULL) {
                 struct lu_env env;
 
-                rc = lu_env_init(&env, LCT_LOCAL);
-                if (unlikely(rc != 0))
-                        CWARN("lu_env initialization failed with rc = %d,"
-                              "cannot start asynchronous commit\n", rc);
+               rc = lu_env_init(&env, LCT_LOCAL);
+               if (unlikely(rc != 0))
+                       CWARN("%s: lu_env initialization failed, cannot "
+                             "start asynchronous commit: rc = %d\n",
+                             obd->obd_name, rc);
                 else
                         mdt_device_commit_async(&env, mdt);
                 lu_env_fini(&env);
                 else
                         mdt_device_commit_async(&env, mdt);
                 lu_env_fini(&env);
@@ -3807,7 +3810,7 @@ static void mdt_stack_pre_fini(const struct lu_env *env,
        lustre_cfg_bufs_set_string(bufs, 1, NULL);
        lcfg = lustre_cfg_new(LCFG_PRE_CLEANUP, bufs);
        if (!lcfg) {
        lustre_cfg_bufs_set_string(bufs, 1, NULL);
        lcfg = lustre_cfg_new(LCFG_PRE_CLEANUP, bufs);
        if (!lcfg) {
-               CERROR("%s:Cannot alloc lcfg!\n", mdt_obd_name(m));
+               CERROR("%s: cannot alloc lcfg\n", mdt_obd_name(m));
                return;
        }
        top->ld_ops->ldo_process_config(env, top, lcfg);
                return;
        }
        top->ld_ops->ldo_process_config(env, top, lcfg);
@@ -5172,13 +5175,13 @@ static int mdt_obd_disconnect(struct obd_export *exp)
         LASSERT(exp);
         class_export_get(exp);
 
         LASSERT(exp);
         class_export_get(exp);
 
-        rc = server_disconnect_export(exp);
-        if (rc != 0)
-                CDEBUG(D_IOCTL, "server disconnect error: %d\n", rc);
+       rc = server_disconnect_export(exp);
+       if (rc != 0)
+               CDEBUG(D_IOCTL, "server disconnect error: rc = %d\n", rc);
 
 
-        rc = mdt_export_cleanup(exp);
-        class_export_put(exp);
-        RETURN(rc);
+       rc = mdt_export_cleanup(exp);
+       class_export_put(exp);
+       RETURN(rc);
 }
 
 /* FIXME: Can we avoid using these two interfaces? */
 }
 
 /* FIXME: Can we avoid using these two interfaces? */
@@ -5491,7 +5494,7 @@ static int mdt_fid2path(struct mdt_thread_info *info,
 
        if (rc < 0) {
                mdt_object_put(info->mti_env, obj);
 
        if (rc < 0) {
                mdt_object_put(info->mti_env, obj);
-               CDEBUG(D_IOCTL, "nonlocal object "DFID": %d\n",
+               CDEBUG(D_IOCTL, "nonlocal object "DFID": rc = %d\n",
                       PFID(&fp->gf_fid), rc);
                RETURN(rc);
        }
                       PFID(&fp->gf_fid), rc);
                RETURN(rc);
        }
@@ -5539,7 +5542,7 @@ int mdt_get_info(struct tgt_session_info *tsi)
 
        key = req_capsule_client_get(tsi->tsi_pill, &RMF_GETINFO_KEY);
        if (key == NULL) {
 
        key = req_capsule_client_get(tsi->tsi_pill, &RMF_GETINFO_KEY);
        if (key == NULL) {
-               CDEBUG(D_IOCTL, "No GETINFO key");
+               CDEBUG(D_IOCTL, "No GETINFO key\n");
                RETURN(err_serious(-EFAULT));
        }
        keylen = req_capsule_get_size(tsi->tsi_pill, &RMF_GETINFO_KEY,
                RETURN(err_serious(-EFAULT));
        }
        keylen = req_capsule_get_size(tsi->tsi_pill, &RMF_GETINFO_KEY,
@@ -5547,7 +5550,8 @@ int mdt_get_info(struct tgt_session_info *tsi)
 
        vallen = req_capsule_client_get(tsi->tsi_pill, &RMF_GETINFO_VALLEN);
        if (vallen == NULL) {
 
        vallen = req_capsule_client_get(tsi->tsi_pill, &RMF_GETINFO_VALLEN);
        if (vallen == NULL) {
-               CDEBUG(D_IOCTL, "Unable to get RMF_GETINFO_VALLEN buffer");
+               CDEBUG(D_IOCTL, "%s: cannot get RMF_GETINFO_VALLEN buffer\n",
+                               tgt_name(tsi->tsi_tgt));
                RETURN(err_serious(-EFAULT));
        }
 
                RETURN(err_serious(-EFAULT));
        }
 
@@ -5559,7 +5563,8 @@ int mdt_get_info(struct tgt_session_info *tsi)
 
        valout = req_capsule_server_get(tsi->tsi_pill, &RMF_GETINFO_VAL);
        if (valout == NULL) {
 
        valout = req_capsule_server_get(tsi->tsi_pill, &RMF_GETINFO_VAL);
        if (valout == NULL) {
-               CDEBUG(D_IOCTL, "Unable to get get-info RPC out buffer");
+               CDEBUG(D_IOCTL, "%s: cannot get get-info RPC out buffer\n",
+                               tgt_name(tsi->tsi_tgt));
                RETURN(err_serious(-EFAULT));
        }
 
                RETURN(err_serious(-EFAULT));
        }
 
@@ -5873,13 +5878,13 @@ void mdt_enable_cos(struct mdt_device *mdt, int val)
 
         mdt->mdt_opts.mo_cos = !!val;
         rc = lu_env_init(&env, LCT_LOCAL);
 
         mdt->mdt_opts.mo_cos = !!val;
         rc = lu_env_init(&env, LCT_LOCAL);
-        if (unlikely(rc != 0)) {
-                CWARN("lu_env initialization failed with rc = %d,"
-                      "cannot sync\n", rc);
-                return;
-        }
-        mdt_device_sync(&env, mdt);
-        lu_env_fini(&env);
+       if (unlikely(rc != 0)) {
+               CWARN("%s: lu_env initialization failed, cannot "
+                     "sync: rc = %d\n", mdt_obd_name(mdt), rc);
+               return;
+       }
+       mdt_device_sync(&env, mdt);
+       lu_env_fini(&env);
 }
 
 /**
 }
 
 /**
index 6b1acf0..01d8741 100644 (file)
@@ -354,7 +354,7 @@ static void *mdt_hsm_actions_proc_start(struct seq_file *s, loff_t *pos)
        struct agent_action_iterator    *aai = s->private;
        ENTRY;
 
        struct agent_action_iterator    *aai = s->private;
        ENTRY;
 
-       LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X",
+       LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X\n",
                 aai->aai_magic);
 
        aai->aai_ctxt = llog_get_context(mdt2obd_dev(aai->aai_mdt),
                 aai->aai_magic);
 
        aai->aai_ctxt = llog_get_context(mdt2obd_dev(aai->aai_mdt),
@@ -403,7 +403,7 @@ static int hsm_actions_show_cb(const struct lu_env *env,
        ENTRY;
 
        aai = s->private;
        ENTRY;
 
        aai = s->private;
-       LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X",
+       LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X\n",
                 aai->aai_magic);
 
        /* if rec already printed => skip */
                 aai->aai_magic);
 
        /* if rec already printed => skip */
@@ -459,7 +459,7 @@ static int mdt_hsm_actions_proc_show(struct seq_file *s, void *v)
        int                              rc;
        ENTRY;
 
        int                              rc;
        ENTRY;
 
-       LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X",
+       LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X\n",
                 aai->aai_magic);
 
        CDEBUG(D_HSM, "show from cat %d index %d eof=%d\n",
                 aai->aai_magic);
 
        CDEBUG(D_HSM, "show from cat %d index %d eof=%d\n",
@@ -488,7 +488,7 @@ static void mdt_hsm_actions_proc_stop(struct seq_file *s, void *v)
        struct agent_action_iterator *aai = s->private;
        ENTRY;
 
        struct agent_action_iterator *aai = s->private;
        ENTRY;
 
-       LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X",
+       LASSERTF(aai->aai_magic == AGENT_ACTIONS_IT_MAGIC, "%08X\n",
                 aai->aai_magic);
 
        if (aai->aai_ctxt)
                 aai->aai_magic);
 
        if (aai->aai_ctxt)
index 574a8f9..65ceaf3 100644 (file)
@@ -163,7 +163,6 @@ static int new_init_ucred(struct mdt_thread_info *info, ucred_init_type_t type,
        if (remote) {
                if (!uid_valid(make_kuid(&init_user_ns, req->rq_auth_mapped_uid))) {
                        CDEBUG(D_SEC, "remote user not mapped, deny access!\n");
        if (remote) {
                if (!uid_valid(make_kuid(&init_user_ns, req->rq_auth_mapped_uid))) {
                        CDEBUG(D_SEC, "remote user not mapped, deny access!\n");
-                       CDEBUG(D_SEC, "remote user not mapped, deny access!\n");
                        RETURN(-EACCES);
                }
 
                        RETURN(-EACCES);
                }
 
index aa9afc5..f279aa5 100644 (file)
@@ -365,7 +365,8 @@ static int config_log_add(struct obd_device *obd, char *logname,
                        *ptr = 0;
                }
                else {
                        *ptr = 0;
                }
                else {
-                       CERROR("sptlrpc log name not correct: %s", seclogname);
+                       CERROR("%s: sptlrpc log name not correct, %s: "
+                              "rc = %d\n", obd->obd_name, seclogname, -EINVAL);
                        config_log_put(cld);
                        RETURN(-EINVAL);
                }
                        config_log_put(cld);
                        RETURN(-EINVAL);
                }
index bdd82c9..1f8b0e8 100644 (file)
@@ -109,9 +109,9 @@ static int cl_lock_invariant(const struct lu_env *env,
 
        result = atomic_read(&lock->cll_ref) > 0 &&
                 cl_lock_invariant_trusted(env, lock);
 
        result = atomic_read(&lock->cll_ref) > 0 &&
                 cl_lock_invariant_trusted(env, lock);
-        if (!result && env != NULL)
-                CL_LOCK_DEBUG(D_ERROR, env, lock, "invariant broken");
-        return result;
+       if (!result && env != NULL)
+               CL_LOCK_DEBUG(D_ERROR, env, lock, "invariant broken\n");
+       return result;
 }
 
 /**
 }
 
 /**
index 52e7c33..7be3554 100644 (file)
@@ -558,7 +558,7 @@ static int llog_test_5(const struct lu_env *env, struct obd_device *obd)
        plain_counter = 0;
        rc = llog_cat_reverse_process(env, llh, plain_print_cb, "foobar");
        if (rc) {
        plain_counter = 0;
        rc = llog_cat_reverse_process(env, llh, plain_print_cb, "foobar");
        if (rc) {
-               CERROR("5f: reversely process with plain_print_cb failed:"
+               CERROR("5f: reversely process with plain_print_cb failed: "
                       "%d\n", rc);
                GOTO(out, rc);
        }
                       "%d\n", rc);
                GOTO(out, rc);
        }
@@ -610,7 +610,7 @@ static int llog_test_6(const struct lu_env *env, struct obd_device *obd,
                         NULL /* obd_connect_data */, NULL);
        if (rc != -EALREADY) {
                CERROR("6a: connect on connected MGC (%s) failed to return"
                         NULL /* obd_connect_data */, NULL);
        if (rc != -EALREADY) {
                CERROR("6a: connect on connected MGC (%s) failed to return"
-                      " -EALREADY", mgc_obd->obd_name);
+                      " -EALREADY\n", mgc_obd->obd_name);
                if (rc == 0)
                        obd_disconnect(exp);
                GOTO(ctxt_release, rc = -EINVAL);
                if (rc == 0)
                        obd_disconnect(exp);
                GOTO(ctxt_release, rc = -EINVAL);
index 87a1303..23e1a8b 100644 (file)
@@ -137,7 +137,7 @@ static void job_stat_put_locked(cfs_hash_t *hs, cfs_hlist_node_t *hnode)
 
 static void job_stat_exit(cfs_hash_t *hs, cfs_hlist_node_t *hnode)
 {
 
 static void job_stat_exit(cfs_hash_t *hs, cfs_hlist_node_t *hnode)
 {
-       CERROR("Should not have any items!");
+       CERROR("should not have any items\n");
 }
 
 static cfs_hash_ops_t job_stats_hash_ops = {
 }
 
 static cfs_hash_ops_t job_stats_hash_ops = {
index f18b4dc..455934d 100644 (file)
@@ -91,7 +91,8 @@ lprocfs_add_simple(struct proc_dir_entry *root, char *name,
                LPROCFS_WRITE_ENTRY();
                proc = create_proc_entry(name, mode, root);
                if (!proc) {
                LPROCFS_WRITE_ENTRY();
                proc = create_proc_entry(name, mode, root);
                if (!proc) {
-                       CERROR("LprocFS: No memory to create /proc entry %s", name);
+                       CERROR("LprocFS: No memory to create /proc entry %s\n",
+                              name);
                        LPROCFS_WRITE_EXIT();
                        return ERR_PTR(-ENOMEM);
                }
                        LPROCFS_WRITE_EXIT();
                        return ERR_PTR(-ENOMEM);
                }
@@ -109,7 +110,7 @@ lprocfs_add_simple(struct proc_dir_entry *root, char *name,
                        mode |= 0200;
                proc = proc_create_data(name, mode, root, fops, data);
                if (!proc) {
                        mode |= 0200;
                proc = proc_create_data(name, mode, root, fops, data);
                if (!proc) {
-                       CERROR("LprocFS: No memory to create /proc entry %s",
+                       CERROR("LprocFS: No memory to create /proc entry %s\n",
                               name);
                        return ERR_PTR(-ENOMEM);
                }
                               name);
                        return ERR_PTR(-ENOMEM);
                }
@@ -137,9 +138,9 @@ struct proc_dir_entry *lprocfs_add_symlink(const char *name,
         va_end(ap);
 
         entry = proc_symlink(name, parent, dest);
         va_end(ap);
 
         entry = proc_symlink(name, parent, dest);
-        if (entry == NULL)
-                CERROR("LprocFS: Could not create symbolic link from %s to %s",
-                        name, dest);
+       if (entry == NULL)
+               CERROR("LprocFS: Could not create symbolic link from "
+                      "%s to %s\n", name, dest);
 
         OBD_FREE(dest, MAX_STRING_SIZE + 1);
         return entry;
 
         OBD_FREE(dest, MAX_STRING_SIZE + 1);
         return entry;
@@ -313,9 +314,9 @@ static int __lprocfs_add_vars(struct proc_dir_entry *root,
                         OBD_FREE(pathcopy, pathsize);
 
                 if (cur_root == NULL || proc == NULL) {
                         OBD_FREE(pathcopy, pathsize);
 
                 if (cur_root == NULL || proc == NULL) {
-                        CERROR("LprocFS: No memory to create /proc entry %s",
-                               list->name);
-                        GOTO(out, rc = -ENOMEM);
+                       CERROR("LprocFS: No memory to create /proc entry %s\n",
+                              list->name);
+                       GOTO(out, rc = -ENOMEM);
                 }
 
                 if (list->fops)
                 }
 
                 if (list->fops)
index 91b3693..618c5bc 100644 (file)
@@ -494,8 +494,8 @@ int lu_cdebug_printer(const struct lu_env *env,
         vsnprintf(key->lck_area + used,
                   ARRAY_SIZE(key->lck_area) - used, format, args);
         if (complete) {
         vsnprintf(key->lck_area + used,
                   ARRAY_SIZE(key->lck_area) - used, format, args);
         if (complete) {
-                if (cfs_cdebug_show(msgdata->msg_mask, msgdata->msg_subsys))
-                        libcfs_debug_msg(msgdata, "%s", key->lck_area);
+               if (cfs_cdebug_show(msgdata->msg_mask, msgdata->msg_subsys))
+                       libcfs_debug_msg(msgdata, "%s\n", key->lck_area);
                 key->lck_area[0] = 0;
         }
         va_end(args);
                 key->lck_area[0] = 0;
         }
         va_end(args);
index c85a594..645e5aa 100644 (file)
@@ -1941,7 +1941,7 @@ int class_config_dump_handler(const struct lu_env *env,
 
        if (rec->lrh_type == OBD_CFG_REC) {
                class_config_parse_rec(rec, outstr, 256);
 
        if (rec->lrh_type == OBD_CFG_REC) {
                class_config_parse_rec(rec, outstr, 256);
-               LCONSOLE(D_WARNING, "   %s", outstr);
+               LCONSOLE(D_WARNING, "   %s\n", outstr);
        } else {
                LCONSOLE(D_WARNING, "unhandled lrh_type: %#x\n", rec->lrh_type);
                rc = -EINVAL;
        } else {
                LCONSOLE(D_WARNING, "unhandled lrh_type: %#x\n", rec->lrh_type);
                rc = -EINVAL;
index b893534..762b9ae 100644 (file)
@@ -2289,8 +2289,12 @@ static int echo_get_object(struct echo_object **ecop, struct echo_device *ed,
 
 static void echo_put_object(struct echo_object *eco)
 {
 
 static void echo_put_object(struct echo_object *eco)
 {
-        if (cl_echo_object_put(eco))
-                CERROR("echo client: drop an object failed");
+       int rc;
+
+       rc = cl_echo_object_put(eco);
+       if (rc)
+               CERROR("%s: echo client drop an object failed: rc = %d\n",
+                      eco->eo_dev->ed_ec->ec_exp->exp_obd->obd_name, rc);
 }
 
 static void
 }
 
 static void
index 2b49d0c..95f68cf 100644 (file)
@@ -426,7 +426,7 @@ static void osc_extent_insert(struct osc_object *obj, struct osc_extent *ext)
                else if (ext->oe_start > tmp->oe_end)
                        n = &(*n)->rb_right;
                else
                else if (ext->oe_start > tmp->oe_end)
                        n = &(*n)->rb_right;
                else
-                       EASSERTF(0, tmp, EXTSTR, EXTPARA(ext));
+                       EASSERTF(0, tmp, EXTSTR"\n", EXTPARA(ext));
        }
        rb_link_node(&ext->oe_node, parent, n);
        rb_insert_color(&ext->oe_node, &obj->oo_root);
        }
        rb_link_node(&ext->oe_node, parent, n);
        rb_insert_color(&ext->oe_node, &obj->oo_root);
@@ -639,7 +639,8 @@ struct osc_extent *osc_extent_find(const struct lu_env *env,
        /* grants has been allocated by caller */
        LASSERTF(*grants >= chunksize + cli->cl_extent_tax,
                 "%u/%u/%u.\n", *grants, chunksize, cli->cl_extent_tax);
        /* grants has been allocated by caller */
        LASSERTF(*grants >= chunksize + cli->cl_extent_tax,
                 "%u/%u/%u.\n", *grants, chunksize, cli->cl_extent_tax);
-       LASSERTF((max_end - cur->oe_start) < max_pages, EXTSTR, EXTPARA(cur));
+       LASSERTF((max_end - cur->oe_start) < max_pages, EXTSTR"\n",
+                EXTPARA(cur));
 
 restart:
        osc_object_lock(obj);
 
 restart:
        osc_object_lock(obj);
@@ -657,7 +658,7 @@ restart:
                /* if covering by different locks, no chance to match */
                if (lock != ext->oe_osclock) {
                        EASSERTF(!overlapped(ext, cur), ext,
                /* if covering by different locks, no chance to match */
                if (lock != ext->oe_osclock) {
                        EASSERTF(!overlapped(ext, cur), ext,
-                                EXTSTR, EXTPARA(cur));
+                                EXTSTR"\n", EXTPARA(cur));
 
                        ext = next_extent(ext);
                        continue;
 
                        ext = next_extent(ext);
                        continue;
@@ -678,7 +679,7 @@ restart:
                         * full contain. */
                        EASSERTF((ext->oe_start <= cur->oe_start &&
                                  ext->oe_end >= cur->oe_end),
                         * full contain. */
                        EASSERTF((ext->oe_start <= cur->oe_start &&
                                  ext->oe_end >= cur->oe_end),
-                                ext, EXTSTR, EXTPARA(cur));
+                                ext, EXTSTR"\n", EXTPARA(cur));
 
                        if (ext->oe_state > OES_CACHE || ext->oe_fsync_wait) {
                                /* for simplicity, we wait for this extent to
 
                        if (ext->oe_state > OES_CACHE || ext->oe_fsync_wait) {
                                /* for simplicity, we wait for this extent to
index fa076cf..4f9fe7a 100644 (file)
@@ -1752,7 +1752,7 @@ int osc_lock_init(const struct lu_env *env,
                if (clk->ols_locklessable && !(enqflags & CEF_DISCARD_DATA))
                        clk->ols_flags |= LDLM_FL_DENY_ON_CONTENTION;
 
                if (clk->ols_locklessable && !(enqflags & CEF_DISCARD_DATA))
                        clk->ols_flags |= LDLM_FL_DENY_ON_CONTENTION;
 
-               LDLM_DEBUG_NOLOCK("lock %p, osc lock %p, flags "LPX64"\n",
+               LDLM_DEBUG_NOLOCK("lock %p, osc lock %p, flags "LPX64,
                                lock, clk, clk->ols_flags);
 
                result = 0;
                                lock, clk, clk->ols_flags);
 
                result = 0;
index ead7e58..38b0d99 100644 (file)
@@ -2629,7 +2629,8 @@ static int osc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
         ENTRY;
 
        if (!try_module_get(THIS_MODULE)) {
         ENTRY;
 
        if (!try_module_get(THIS_MODULE)) {
-               CERROR("Can't get module. Is it alive?");
+               CERROR("%s: cannot get module '%s'\n", obd->obd_name,
+                      module_name(THIS_MODULE));
                return -EINVAL;
        }
         switch (cmd) {
                return -EINVAL;
        }
         switch (cmd) {
index e4412fb..0c5a07d 100644 (file)
@@ -558,7 +558,7 @@ static int osd_fid_lookup(const struct lu_env *env, struct osd_object *obj,
 
        LINVRNT(osd_invariant(obj));
        LASSERT(obj->oo_inode == NULL);
 
        LINVRNT(osd_invariant(obj));
        LASSERT(obj->oo_inode == NULL);
-       LASSERTF(fid_is_sane(fid) || fid_is_idif(fid), DFID, PFID(fid));
+       LASSERTF(fid_is_sane(fid) || fid_is_idif(fid), DFID"\n", PFID(fid));
 
        dev = osd_dev(ldev);
        scrub = &dev->od_scrub;
 
        dev = osd_dev(ldev);
        scrub = &dev->od_scrub;
@@ -1937,8 +1937,8 @@ static int osd_quota_transfer(struct inode *inode, const struct lu_attr *attr)
                rc = ll_vfs_dq_transfer(inode, &iattr);
                if (rc) {
                        CERROR("%s: quota transfer failed: rc = %d. Is quota "
                rc = ll_vfs_dq_transfer(inode, &iattr);
                if (rc) {
                        CERROR("%s: quota transfer failed: rc = %d. Is quota "
-                              "enforcement enabled on the ldiskfs filesystem?",
-                              inode->i_sb->s_id, rc);
+                              "enforcement enabled on the ldiskfs "
+                              "filesystem?\n", inode->i_sb->s_id, rc);
                        return rc;
                }
        }
                        return rc;
                }
        }
@@ -2250,7 +2250,7 @@ static void osd_attr_init(struct osd_thread_info *info, struct osd_object *obj,
                  * should not happen since quota enforcement is no longer
                  * enabled on ldiskfs (lquota takes care of it).
                  */
                  * should not happen since quota enforcement is no longer
                  * enabled on ldiskfs (lquota takes care of it).
                  */
-                LASSERTF(result == 0, "%d", result);
+               LASSERTF(result == 0, "%d\n", result);
                ll_dirty_inode(inode, I_DIRTY_DATASYNC);
         }
 
                ll_dirty_inode(inode, I_DIRTY_DATASYNC);
         }
 
@@ -4380,7 +4380,7 @@ static int osd_index_ea_insert(const struct lu_env *env, struct dt_object *dt,
        if (osd_object_auth(env, dt, capa, CAPA_OPC_INDEX_INSERT))
                RETURN(-EACCES);
 
        if (osd_object_auth(env, dt, capa, CAPA_OPC_INDEX_INSERT))
                RETURN(-EACCES);
 
-       LASSERTF(fid_is_sane(fid), "fid"DFID" is insane!", PFID(fid));
+       LASSERTF(fid_is_sane(fid), "fid"DFID" is insane!\n", PFID(fid));
 
        rc = osd_remote_fid(env, osd, fid);
        if (rc < 0) {
 
        rc = osd_remote_fid(env, osd, fid);
        if (rc < 0) {
index 8223711..1464791 100644 (file)
@@ -407,12 +407,12 @@ static int lvar_init(struct iam_leaf *l)
                 struct inode *obj;
 
                 obj = iam_leaf_container(l)->ic_object;
                 struct inode *obj;
 
                 obj = iam_leaf_container(l)->ic_object;
-                CERROR("Wrong magic in node %llu (#%lu): %#x != %#x or "
-                       "wrong used: %d",
-                       (unsigned long long)l->il_bh->b_blocknr, obj->i_ino,
+               CERROR("Wrong magic in node %llu (#%lu): %#x != %#x or "
+                      "wrong used: %d\n",
+                      (unsigned long long)l->il_bh->b_blocknr, obj->i_ino,
                       le16_to_cpu(head->vlh_magic), IAM_LVAR_LEAF_MAGIC,
                       le16_to_cpu(head->vlh_magic), IAM_LVAR_LEAF_MAGIC,
-                       used);
-                result = -EIO;
+                      used);
+               result = -EIO;
         }
         return result;
 }
         }
         return result;
 }
index 8e23a21..fdb7915 100644 (file)
@@ -1509,9 +1509,9 @@ int osd_ldiskfs_write_record(struct inode *inode, void *buf, int bufsize,
                                err);
                         break;
                 }
                                err);
                         break;
                 }
-                LASSERTF(boffs + size <= bh->b_size,
-                         "boffs %d size %d bh->b_size %lu",
-                         boffs, size, (unsigned long)bh->b_size);
+               LASSERTF(boffs + size <= bh->b_size,
+                        "boffs %d size %d bh->b_size %lu\n",
+                        boffs, size, (unsigned long)bh->b_size);
                 memcpy(bh->b_data + boffs, buf, size);
                 err = ldiskfs_journal_dirty_metadata(handle, bh);
                 if (err)
                 memcpy(bh->b_data + boffs, buf, size);
                 err = ldiskfs_journal_dirty_metadata(handle, bh);
                 if (err)
index 45aff9f..2b0ccbd 100644 (file)
@@ -1183,7 +1183,8 @@ static int osp_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
        LASSERT(d->opd_dt_dev.dd_ops == &osp_dt_ops);
 
        if (!try_module_get(THIS_MODULE)) {
        LASSERT(d->opd_dt_dev.dd_ops == &osp_dt_ops);
 
        if (!try_module_get(THIS_MODULE)) {
-               CERROR("%s: can't get module. Is it alive?", obd->obd_name);
+               CERROR("%s: cannot get module '%s'\n", obd->obd_name,
+                      module_name(THIS_MODULE));
                return -EINVAL;
        }
 
                return -EINVAL;
        }
 
index 679d05f..f6dbb30 100644 (file)
@@ -711,9 +711,9 @@ struct ptlrpc_request *__ptlrpc_request_alloc(struct obd_import *imp,
                request = ptlrpc_request_cache_alloc(GFP_NOFS);
 
        if (request) {
                request = ptlrpc_request_cache_alloc(GFP_NOFS);
 
        if (request) {
-               LASSERTF((unsigned long)imp > 0x1000, "%p", imp);
+               LASSERTF((unsigned long)imp > 0x1000, "%p\n", imp);
                LASSERT(imp != LP_POISON);
                LASSERT(imp != LP_POISON);
-               LASSERTF((unsigned long)imp->imp_client > 0x1000, "%p",
+               LASSERTF((unsigned long)imp->imp_client > 0x1000, "%p\n",
                        imp->imp_client);
                LASSERT(imp->imp_client != LP_POISON);
 
                        imp->imp_client);
                LASSERT(imp->imp_client != LP_POISON);
 
@@ -2701,11 +2701,11 @@ int ptlrpc_queue_wait(struct ptlrpc_request *req)
         LASSERT(req->rq_set == NULL);
         LASSERT(!req->rq_receiving_reply);
 
         LASSERT(req->rq_set == NULL);
         LASSERT(!req->rq_receiving_reply);
 
-        set = ptlrpc_prep_set();
-        if (set == NULL) {
-                CERROR("Unable to allocate ptlrpc set.");
-                RETURN(-ENOMEM);
-        }
+       set = ptlrpc_prep_set();
+       if (set == NULL) {
+               CERROR("cannot allocate ptlrpc set: rc = %d\n", -ENOMEM);
+               RETURN(-ENOMEM);
+       }
 
        /* for distributed debugging */
        lustre_msg_set_status(req->rq_reqmsg, current_pid());
 
        /* for distributed debugging */
        lustre_msg_set_status(req->rq_reqmsg, current_pid());
index 4d93aa4..ac9efab 100644 (file)
@@ -2124,7 +2124,7 @@ int sptlrpc_svc_alloc_rs(struct ptlrpc_request *req, int msglen)
                if (svcpt->scp_service->srv_max_reply_size <
                   msglen + sizeof(struct ptlrpc_reply_state)) {
                        /* Just return failure if the size is too big */
                if (svcpt->scp_service->srv_max_reply_size <
                   msglen + sizeof(struct ptlrpc_reply_state)) {
                        /* Just return failure if the size is too big */
-                       CERROR("size of message is too big (%zd), %d allowed",
+                       CERROR("size of message is too big (%zd), %d allowed\n",
                                msglen + sizeof(struct ptlrpc_reply_state),
                                svcpt->scp_service->srv_max_reply_size);
                        RETURN(-ENOMEM);
                                msglen + sizeof(struct ptlrpc_reply_state),
                                svcpt->scp_service->srv_max_reply_size);
                        RETURN(-ENOMEM);
@@ -2310,12 +2310,12 @@ int sptlrpc_cli_unwrap_bulk_write(struct ptlrpc_request *req,
          * in case of privacy mode, nob_transferred needs to be adjusted.
          */
         if (desc->bd_nob != desc->bd_nob_transferred) {
          * in case of privacy mode, nob_transferred needs to be adjusted.
          */
         if (desc->bd_nob != desc->bd_nob_transferred) {
-                CERROR("nob %d doesn't match transferred nob %d",
-                       desc->bd_nob, desc->bd_nob_transferred);
-                return -EPROTO;
-        }
+               CERROR("nob %d doesn't match transferred nob %d\n",
+                      desc->bd_nob, desc->bd_nob_transferred);
+               return -EPROTO;
+       }
 
 
-        return 0;
+       return 0;
 }
 EXPORT_SYMBOL(sptlrpc_cli_unwrap_bulk_write);
 
 }
 EXPORT_SYMBOL(sptlrpc_cli_unwrap_bulk_write);
 
index 8d31852..2280f06 100644 (file)
@@ -678,7 +678,7 @@ int lquota_disk_write(const struct lu_env *env, struct thandle *th,
                        rc = dt_insert(env, obj, (struct dt_rec *)&qti->qti_rec,
                                       key, th, BYPASS_CAPA, 1);
                        LASSERTF(rc == 0, "failed to insert record in quota "
                        rc = dt_insert(env, obj, (struct dt_rec *)&qti->qti_rec,
                                       key, th, BYPASS_CAPA, 1);
                        LASSERTF(rc == 0, "failed to insert record in quota "
-                                "index "DFID,
+                                "index "DFID"\n",
                                 PFID(lu_object_fid(&obj->do_lu)));
                        GOTO(out, rc);
                }
                                 PFID(lu_object_fid(&obj->do_lu)));
                        GOTO(out, rc);
                }
index 22a5d9d..a87e231 100644 (file)
@@ -854,7 +854,7 @@ int qsd_op_begin(const struct lu_env *env, struct qsd_instance *qsd,
            qsd->qsd_acct_failed)
                RETURN(0);
 
            qsd->qsd_acct_failed)
                RETURN(0);
 
-       LASSERTF(trans->lqt_id_cnt <= QUOTA_MAX_TRANSIDS, "id_cnt=%d",
+       LASSERTF(trans->lqt_id_cnt <= QUOTA_MAX_TRANSIDS, "id_cnt=%d\n",
                 trans->lqt_id_cnt);
        /* check whether we already allocated a slot for this id */
        for (i = 0; i < trans->lqt_id_cnt; i++) {
                 trans->lqt_id_cnt);
        /* check whether we already allocated a slot for this id */
        for (i = 0; i < trans->lqt_id_cnt; i++) {
index 139ba49..8842eeb 100644 (file)
@@ -221,7 +221,7 @@ static int qsd_glb_blocking_ast(struct ldlm_lock *lock,
                break;
        }
        default:
                break;
        }
        default:
-               LASSERTF(0, "invalid flags for blocking ast %d", flag);
+               LASSERTF(0, "invalid flags for blocking ast %d\n", flag);
        }
 
        RETURN(rc);
        }
 
        RETURN(rc);
@@ -363,7 +363,7 @@ static int qsd_id_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *de
                break;
        }
        default:
                break;
        }
        default:
-               LASSERTF(0, "invalid flags for blocking ast %d", flag);
+               LASSERTF(0, "invalid flags for blocking ast %d\n", flag);
        }
 
        RETURN(rc);
        }
 
        RETURN(rc);
index ee8380a..83f2528 100644 (file)
@@ -264,7 +264,7 @@ int qsd_intent_lock(const struct lu_env *env, struct obd_export *exp,
                qti->qti_einfo.ei_cbdata = arg;
                break;
        default:
                qti->qti_einfo.ei_cbdata = arg;
                break;
        default:
-               LASSERTF(0, "invalid it_op %d", it_op);
+               LASSERTF(0, "invalid it_op %d\n", it_op);
        }
 
        /* build lock enqueue request */
        }
 
        /* build lock enqueue request */
index 56dbdcb..e24f28c 100644 (file)
@@ -56,7 +56,6 @@ static struct qsd_upd_rec *qsd_upd_alloc(struct qsd_qtype_info *qqi,
 
        OBD_SLAB_ALLOC_PTR_GFP(upd, upd_kmem, GFP_NOFS);
        if (upd == NULL) {
 
        OBD_SLAB_ALLOC_PTR_GFP(upd, upd_kmem, GFP_NOFS);
        if (upd == NULL) {
-               CERROR("Failed to allocate upd");
                return NULL;
        }
 
                return NULL;
        }
 
@@ -427,7 +426,7 @@ static int qsd_upd_thread(void *arg)
 
        rc = lu_env_init(env, LCT_DT_THREAD);
        if (rc) {
 
        rc = lu_env_init(env, LCT_DT_THREAD);
        if (rc) {
-               CERROR("%s: Fail to init env.", qsd->qsd_svname);
+               CERROR("%s: cannot init env: rc = %d\n", qsd->qsd_svname, rc);
                OBD_FREE_PTR(env);
                RETURN(rc);
        }
                OBD_FREE_PTR(env);
                RETURN(rc);
        }
@@ -500,7 +499,7 @@ int qsd_start_upd_thread(struct qsd_instance *qsd)
        task = kthread_run(qsd_upd_thread, (void *)qsd,
                           "lquota_wb_%s", qsd->qsd_svname);
        if (IS_ERR(task)) {
        task = kthread_run(qsd_upd_thread, (void *)qsd,
                           "lquota_wb_%s", qsd->qsd_svname);
        if (IS_ERR(task)) {
-               CERROR("Fail to start quota update thread. rc: %ld\n",
+               CERROR("fail to start quota update thread: rc = %ld\n",
                        PTR_ERR(task));
                thread_set_flags(thread, SVC_STOPPED);
                RETURN(PTR_ERR(task));
                        PTR_ERR(task));
                thread_set_flags(thread, SVC_STOPPED);
                RETURN(PTR_ERR(task));
index 5042aac..18df7d8 100644 (file)
@@ -243,11 +243,11 @@ int jt_obd_cleanup(int argc, char **argv)
                         flags[flag_cnt++] = force;
                 } else if (strcmp(argv[n], "failover") == 0) {
                         flags[flag_cnt++] = failover;
                         flags[flag_cnt++] = force;
                 } else if (strcmp(argv[n], "failover") == 0) {
                         flags[flag_cnt++] = failover;
-                } else {
-                        fprintf(stderr, "unknown option: %s", argv[n]);
-                        return CMD_HELP;
-                }
-        }
+               } else {
+                       fprintf(stderr, "unknown option: %s\n", argv[n]);
+                       return CMD_HELP;
+               }
+       }
 
         if (flag_cnt) {
                 lustre_cfg_bufs_set_string(&bufs, 1, flags);
 
         if (flag_cnt) {
                 lustre_cfg_bufs_set_string(&bufs, 1, flags);