Whamcloud - gitweb
LU-1095 debug: quiet noisy console error messages
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 3 May 2013 23:25:47 +0000 (17:25 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 6 May 2013 16:35:09 +0000 (12:35 -0400)
Quiet a number of overly noisy and unhelpful console error
messages.  Improve the format of other nearby errors.

In the case of {lod,lov}_fix_desc_stripe_size(), this doesn't
even need a console message unless it is actually changing
some stripe size that is below the minimum.  Typically it is
only zero and is being bumped up to the default value.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I0830e514c426080b8c3446c0a1a359c313b530d9
Reviewed-on: http://review.whamcloud.com/6264
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/fld/fld_handler.c
lustre/ldlm/ldlm_lib.c
lustre/lod/lod_dev.c
lustre/lod/lod_lov.c
lustre/lov/lov_obd.c
lustre/mdd/mdd_dir.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_lproc.c
lustre/mdt/mdt_reint.c
lustre/ofd/ofd_obd.c
lustre/ptlrpc/nrs_orr.c

index dabcddf..84d90ce 100644 (file)
@@ -166,7 +166,7 @@ int fld_server_lookup(const struct lu_env *env, struct lu_server_fld *fld,
                /* On server side, all entries should be in cache.
                 * If we can not find it in cache, just return error */
                CERROR("%s: Cannot find sequence "LPX64": rc = %d\n",
-                       fld->lsf_name, seq, -EIO);
+                      fld->lsf_name, seq, -EIO);
                RETURN(-EIO);
        } else {
                LASSERT(fld->lsf_control_exp);
index e51ab0c..88b51a9 100644 (file)
@@ -793,8 +793,9 @@ int target_handle_connect(struct ptlrpc_request *req)
 
        if (!target) {
                deuuidify(str, NULL, &target_start, &target_len);
-               LCONSOLE_ERROR_MSG(0x137, "UUID '%s' is not available for "
-                                  "connect (no target)\n", str);
+               LCONSOLE_ERROR_MSG(0x137, "%s: not available for connect "
+                                  "from %s (no target)\n", str,
+                                  libcfs_nid2str(req->rq_peer.nid));
                GOTO(out, rc = -ENODEV);
        }
 
@@ -803,11 +804,11 @@ int target_handle_connect(struct ptlrpc_request *req)
                spin_unlock(&target->obd_dev_lock);
 
                deuuidify(str, NULL, &target_start, &target_len);
-               LCONSOLE_ERROR_MSG(0x137, "%.*s: Not available for connect "
-                                  "from %s (%s)\n", target_len, target_start,
-                                  libcfs_nid2str(req->rq_peer.nid), 
-                                  (target->obd_stopping ?
-                                  "stopping" : "not set up"));
+               LCONSOLE_INFO("%.*s: Not available for connect from %s (%s)\n",
+                             target_len, target_start,
+                             libcfs_nid2str(req->rq_peer.nid),
+                             (target->obd_stopping ?
+                              "stopping" : "not set up"));
                GOTO(out, rc = -ENODEV);
        }
 
index 31d336c..f766fba 100644 (file)
@@ -81,11 +81,8 @@ int lod_fld_lookup(const struct lu_env *env, struct lod_device *lod,
        server_fld = lu_site2seq(lod2lu_dev(lod)->ld_site)->ss_server_fld;
        fld_range_set_type(&range, type);
        rc = fld_server_lookup(env, server_fld, fid_seq(fid), &range);
-       if (rc) {
-               CERROR("%s: Can't find tgt by seq "LPX64", rc %d\n",
-                      lod2obd(lod)->obd_name, fid_seq(fid), rc);
+       if (rc)
                RETURN(rc);
-       }
 
        *tgt = range.lsr_index;
 
index 87386f5..14a2e79 100644 (file)
@@ -920,9 +920,11 @@ int lod_verify_striping(struct lod_device *d, const struct lu_buf *buf,
 
 void lod_fix_desc_stripe_size(__u64 *val)
 {
-       if (*val < LOV_DEFAULT_STRIPE_SIZE) {
-               LCONSOLE_WARN("Increasing default stripe size to min %u\n",
-                             LOV_DEFAULT_STRIPE_SIZE);
+       if (*val < LOV_MIN_STRIPE_SIZE) {
+               if (*val != 0)
+                       LCONSOLE_INFO("Increasing default stripe size to "
+                                     "minimum value %u\n",
+                                     LOV_DEFAULT_STRIPE_SIZE);
                *val = LOV_DEFAULT_STRIPE_SIZE;
        } else if (*val & (LOV_MIN_STRIPE_SIZE - 1)) {
                *val &= ~(LOV_MIN_STRIPE_SIZE - 1);
index 71dfcac..2eb32e1 100644 (file)
@@ -747,9 +747,11 @@ static void __lov_del_obd(struct obd_device *obd, struct lov_tgt_desc *tgt)
 
 void lov_fix_desc_stripe_size(__u64 *val)
 {
-       if (*val < LOV_DEFAULT_STRIPE_SIZE) {
-               LCONSOLE_WARN("Increasing default stripe size to min %u\n",
-                             LOV_DEFAULT_STRIPE_SIZE);
+       if (*val < LOV_MIN_STRIPE_SIZE) {
+               if (*val != 0)
+                       LCONSOLE_INFO("Increasing default stripe size to "
+                                     "minimum %u\n",
+                                     LOV_DEFAULT_STRIPE_SIZE);
                *val = LOV_DEFAULT_STRIPE_SIZE;
        } else if (*val & (LOV_MIN_STRIPE_SIZE - 1)) {
                *val &= ~(LOV_MIN_STRIPE_SIZE - 1);
index 89855f9..e8b2f6d 100644 (file)
@@ -981,7 +981,7 @@ out:
                rc = rc2;
        if (rc) {
                int error = 1;
-               if (rc == -EOVERFLOW || rc == -ENOENT)
+               if (rc == -EOVERFLOW || rc == -ENOENT || rc == -ENOSPC)
                        error = 0;
                if (oldpfid == NULL)
                        CDEBUG(error ? D_ERROR : D_OTHER,
index 82cfdef..13bc110 100644 (file)
@@ -726,11 +726,12 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
                 ma->ma_som = &info->mti_u.som.data;
 
        rc = mdt_attr_get_complex(info, o, ma);
-        if (unlikely(rc)) {
-                CERROR("getattr error for "DFID": %d\n",
-                        PFID(mdt_object_fid(o)), rc);
-                RETURN(rc);
-        }
+       if (unlikely(rc)) {
+               CERROR("%s: getattr error for "DFID": rc = %d\n",
+                      mdt_obd_name(info->mti_mdt),
+                      PFID(mdt_object_fid(o)), rc);
+               RETURN(rc);
+       }
 
        is_root = lu_fid_eq(mdt_object_fid(o), &info->mti_mdt->mdt_md_root_fid);
 
@@ -751,8 +752,9 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
                rc = mdt_attr_get_lov(info, root, ma);
                mdt_object_put(info->mti_env, root);
                if (unlikely(rc)) {
-                       CERROR("getattr error for "DFID": %d\n",
-                                       PFID(mdt_object_fid(o)), rc);
+                       CERROR("%s: getattr error for "DFID": rc = %d\n",
+                              mdt_obd_name(info->mti_mdt),
+                              PFID(mdt_object_fid(o)), rc);
                        RETURN(rc);
                }
        }
@@ -777,17 +779,19 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
                         repbody->eadatasize = ma->ma_lmv_size;
                         repbody->valid |= (OBD_MD_FLDIREA|OBD_MD_MEA);
                 }
-        } else if (S_ISLNK(la->la_mode) &&
-                   reqbody->valid & OBD_MD_LINKNAME) {
-                buffer->lb_buf = ma->ma_lmm;
-                /* eadatasize from client includes NULL-terminator, so
-                 * there is no need to read it */
-                buffer->lb_len = reqbody->eadatasize - 1;
-                rc = mo_readlink(env, next, buffer);
-                if (unlikely(rc <= 0)) {
-                        CERROR("readlink failed: %d\n", rc);
-                        rc = -EFAULT;
-                } else {
+       } else if (S_ISLNK(la->la_mode) &&
+                  reqbody->valid & OBD_MD_LINKNAME) {
+               buffer->lb_buf = ma->ma_lmm;
+               /* eadatasize from client includes NULL-terminator, so
+                * there is no need to read it */
+               buffer->lb_len = reqbody->eadatasize - 1;
+               rc = mo_readlink(env, next, buffer);
+               if (unlikely(rc <= 0)) {
+                       CERROR("%s: readlink failed for "DFID": rc = %d\n",
+                              mdt_obd_name(info->mti_mdt),
+                              PFID(mdt_object_fid(o)), rc);
+                       rc = -EFAULT;
+               } else {
                        int print_limit = min_t(int, CFS_PAGE_SIZE - 128, rc);
 
                        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_READLINK_EPROTO))
@@ -797,8 +801,11 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
                         * because client expects that */
                        repbody->eadatasize = rc + 1;
                        if (repbody->eadatasize != reqbody->eadatasize)
-                               CERROR("Read shorter symlink %d, expected %d\n",
-                                      rc, reqbody->eadatasize - 1);
+                               CDEBUG(D_INODE, "%s: Read shorter symlink %d "
+                                      "on "DFID ", expected %d\n",
+                                      mdt_obd_name(info->mti_mdt),
+                                      rc, PFID(mdt_object_fid(o)),
+                                      reqbody->eadatasize - 1);
                        /* NULL terminate */
                        ((char *)ma->ma_lmm)[rc] = 0;
 
@@ -852,9 +859,12 @@ static int mdt_getattr_internal(struct mdt_thread_info *info,
                                         rc = 0;
                                 } else if (rc == -EOPNOTSUPP) {
                                         rc = 0;
-                                } else {
-                                        CERROR("got acl size: %d\n", rc);
-                                }
+                               } else {
+                                       CERROR("%s: unable to read "DFID
+                                              " ACL: rc = %d\n",
+                                              mdt_obd_name(info->mti_mdt),
+                                              PFID(mdt_object_fid(o)), rc);
+                               }
                         } else {
                                 repbody->aclsize = rc;
                                 repbody->valid |= OBD_MD_FLACL;
index 59983a6..1d4b483 100644 (file)
@@ -371,8 +371,8 @@ static int lprocfs_wr_identity_upcall(struct file *file, const char *buffer,
                CWARN("%s: disable \"identity_upcall\" with ACL enabled maybe "
                      "cause unexpected \"EACCESS\"\n", mdt_obd_name(mdt));
 
-       CWARN("%s: identity upcall set to %s\n", mdt_obd_name(mdt),
-             hash->uc_upcall);
+       CDEBUG(D_CONFIG, "%s: identity upcall set to %s\n", mdt_obd_name(mdt),
+              hash->uc_upcall);
        OBD_FREE(kernbuf, count + 1);
        RETURN(count);
 
index 01717fd..d03c231 100644 (file)
@@ -814,10 +814,10 @@ static int mdt_reint_unlink(struct mdt_thread_info *info,
                repbody->valid |= (OBD_MD_FLID | OBD_MD_MDS);
                GOTO(unlock_child, rc = -EREMOTE);
        } else if (info->mti_spec.sp_rm_entry) {
-               CERROR("%s: lfs rmdir should not be used on local dir %s\n",
-                      mdt_obd_name(info->mti_mdt),
-                      (char *)rr->rr_name);
-               GOTO(put_child, rc = -EPERM);
+               rc = -EPERM;
+               CDEBUG(D_INFO, "%s: no rm_entry on local dir '%s': rc = %d\n",
+                      mdt_obd_name(info->mti_mdt), (char *)rr->rr_name, rc);
+               GOTO(put_child, rc);
        }
 
        rc = mdt_object_lock(info, mc, child_lh, MDS_INODELOCK_FULL,
index 7ce79de..aa1b8f1 100644 (file)
@@ -1145,9 +1145,9 @@ static int ofd_orphans_destroy(const struct lu_env *env,
        skip_orphan = !!(exp_connect_flags(exp) & OBD_CONNECT_SKIP_ORPHAN);
 
        last = ofd_seq_last_oid(oseq);
-       LCONSOLE_INFO("%s: deleting orphan objects from "LPX64":"LPU64
-                     " to "LPU64"\n", ofd_name(ofd), ostid_seq(&oa->o_oi),
-                     end_id + 1, last);
+       LCONSOLE(D_INFO, "%s: deleting orphan objects from "DOSTID
+                " to "DOSTID"\n", ofd_name(ofd), ostid_seq(&oa->o_oi),
+                end_id + 1, ostid_seq(&oa->o_oi), last);
 
        for (ostid_set_id(&oi, last); ostid_id(&oi) > end_id;
                          ostid_dec_id(&oi)) {
@@ -1156,8 +1156,8 @@ static int ofd_orphans_destroy(const struct lu_env *env,
                        GOTO(out_put, rc);
                rc = ofd_destroy_by_fid(env, ofd, &info->fti_fid, 1);
                if (rc && rc != -ENOENT) /* this is pretty fatal... */
-                       CEMERG("error destroying precreated id "DOSTID": %d\n",
-                              POSTID(&oi), rc);
+                       CEMERG("%s: error destroying precreated id "DOSTID
+                              ": rc = %d\n", ofd_name(ofd), POSTID(&oi), rc);
                if (!skip_orphan) {
                        ofd_seq_last_oid_set(oseq, ostid_id(&oi) - 1);
                        /* update last_id on disk periodically so that if we
@@ -1167,7 +1167,7 @@ static int ofd_orphans_destroy(const struct lu_env *env,
                                ofd_seq_last_oid_write(env, ofd, oseq);
                }
        }
-       CDEBUG(D_HA, "%s: after destroy: set last_objids"DOSTID"\n",
+       CDEBUG(D_HA, "%s: after destroy: set last_id to "DOSTID"\n",
               ofd_obd(ofd)->obd_name, POSTID(&oa->o_oi));
        if (!skip_orphan) {
                rc = ofd_seq_last_oid_write(env, ofd, oseq);
index 963dd3f..bc4b373 100644 (file)
@@ -595,7 +595,8 @@ static cfs_binheap_ops_t nrs_orr_heap_ops = {
 
 /**
  * Prints a warning message if an ORR/TRR policy is started on a service with
- * more than one CPT.
+ * more than one CPT.  Not printed on the console for now, since we don't
+ * have any performance metrics in the first place, and it is annoying.
  *
  * \param[in] policy the policy instance
  *
@@ -603,16 +604,13 @@ static cfs_binheap_ops_t nrs_orr_heap_ops = {
  */
 static int nrs_orr_init(struct ptlrpc_nrs_policy *policy)
 {
-       if (policy->pol_nrs->nrs_svcpt->scp_service->srv_ncpts > 1) {
-               bool is_orr = strncmp(policy->pol_desc->pd_name,
-                                     NRS_POL_NAME_ORR, NRS_POL_NAME_MAX) == 0;
-
-               CWARN("A%s %s NRS policy has been registered on a PTLRPC "
-                     "service which has more than one service partition. "
-                     "Please be advised that this policy may perform better "
-                     "on services with only one partition.\n",
-                     is_orr ? "n" : "", policy->pol_desc->pd_name);
-       }
+       if (policy->pol_nrs->nrs_svcpt->scp_service->srv_ncpts > 1)
+               CDEBUG(D_CONFIG, "%s: The %s NRS policy was registered on a "
+                     "service with multiple service partitions. This policy "
+                     "may perform better with a single partition.\n",
+                     policy->pol_nrs->nrs_svcpt->scp_service->srv_name,
+                     policy->pol_desc->pd_name);
+
        return 0;
 }