Whamcloud - gitweb
LU-2156 debug: quiet overly verbose console errors
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 17 Oct 2012 18:42:17 +0000 (12:42 -0600)
committerOleg Drokin <green@whamcloud.com>
Sun, 16 Dec 2012 18:32:27 +0000 (13:32 -0500)
A number of error messages are printed on the console that do not
represent error conditions, or print the message in an overly
confusing manner.  One in an ongoing series of patches to clean
up the console errors.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie830cfb49e390ca4da1f4b9ed7187d421e74f12f
Reviewed-on: http://review.whamcloud.com/4286
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Hudson
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/ofd/ofd_obd.c
lustre/osp/osp_precreate.c

index 072a53c..da53bd3 100644 (file)
@@ -2321,24 +2321,23 @@ ldlm_mode_t ll_take_md_lock(struct inode *inode, __u64 bits,
         RETURN(rc);
 }
 
-static int ll_inode_revalidate_fini(struct inode *inode, int rc) {
-       if (rc == -ENOENT) { /* Already unlinked. Just update nlink
-                             * and return success */
+static int ll_inode_revalidate_fini(struct inode *inode, int rc)
+{
+       /* Already unlinked. Just update nlink and return success */
+       if (rc == -ENOENT) {
                clear_nlink(inode);
                /* This path cannot be hit for regular files unless in
                 * case of obscure races, so no need to to validate
                 * size. */
-               if (!S_ISREG(inode->i_mode) &&
-                   !S_ISDIR(inode->i_mode))
+               if (!S_ISREG(inode->i_mode) && !S_ISDIR(inode->i_mode))
                        return 0;
+       } else if (rc != 0) {
+               CERROR("%s: revalidate FID "DFID" error: rc = %d\n",
+                      ll_get_fsname(inode->i_sb, NULL, 0),
+                      PFID(ll_inode2fid(inode)), rc);
        }
 
-       if (rc) {
-               CERROR("failure %d inode %lu\n", rc, inode->i_ino);
-               return -abs(rc);
-       }
-
-       return 0;
+       return rc;
 }
 
 int __ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it,
@@ -2350,10 +2349,7 @@ int __ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it,
         int rc = 0;
         ENTRY;
 
-        if (!inode) {
-                CERROR("REPORT THIS LINE TO PETER\n");
-                RETURN(0);
-        }
+        LASSERT(inode != NULL);
 
         CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),name=%s\n",
                inode->i_ino, inode->i_generation, inode, dentry->d_name.name);
index a424766..ea34779 100644 (file)
@@ -1110,9 +1110,10 @@ static inline struct obd_export *ll_i2mdexp(struct inode *inode)
 static inline struct lu_fid *ll_inode2fid(struct inode *inode)
 {
         struct lu_fid *fid;
+
         LASSERT(inode != NULL);
         fid = &ll_i2info(inode)->lli_fid;
-        LASSERT(fid_is_igif(fid) || fid_ver(fid) == 0);
+
         return fid;
 }
 
index 2f255fe..2952f03 100644 (file)
@@ -1065,8 +1065,8 @@ static int ofd_orphans_destroy(const struct lu_env *env,
        skip_orphan = !!(exp->exp_connect_flags & OBD_CONNECT_SKIP_ORPHAN);
 
        last = ofd_last_id(ofd, oa->o_seq);
-       CWARN("%s: deleting orphan objects from "LPU64" to "LPU64"\n",
-             ofd_obd(ofd)->obd_name, oa->o_id + 1, last);
+       LCONSOLE_INFO("%s: deleting orphan objects from "LPU64" to "LPU64"\n",
+                     ofd_obd(ofd)->obd_name, oa->o_id + 1, last);
 
        for (oi.oi_id = last; oi.oi_id > oa->o_id; oi.oi_id--) {
                fid_ostid_unpack(&info->fti_fid, &oi, 0);
index 7d13618..bc557e4 100644 (file)
@@ -112,7 +112,7 @@ out:
        /* couldn't update statfs, try again as soon as possible */
        cfs_waitq_signal(&d->opd_pre_waitq);
        if (req->rq_import_generation == imp->imp_generation)
-               CERROR("%s: couldn't update statfs: rc = %d\n",
+               CDEBUG(D_CACHE, "%s: couldn't update statfs: rc = %d\n",
                       d->opd_obd->obd_name, rc);
        RETURN(rc);
 }