Whamcloud - gitweb
LU-1095 debug: quiet unnecessary console chatter
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 6 Sep 2012 19:55:41 +0000 (13:55 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 17 Sep 2012 22:17:51 +0000 (18:17 -0400)
Quiet warning when configuring non-default CPT partitions, since this
will happen whenever the module parameter is changed.  Only complain
if the number of partitions is more than the number of cores, or if
it is more than 4x the recommended number.

Running racer.sh provokes a lot of messages from mdd_readdir(),
because it is doing "ls" in a directory that has been unlinked.
This is legal under POSIX and should not generate a console message.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I33afab093e9a03324a579244ce5177708735e7cc
Reviewed-on: http://review.whamcloud.com/3894
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/linux/linux-cpu.c
lustre/mdd/mdd_object.c

index 3bc7e69..57cf5c7 100644 (file)
@@ -804,9 +804,9 @@ cfs_cpt_table_create(int ncpt)
        if (ncpt <= 0)
                ncpt = rc;
 
-       if (ncpt > rc) {
+       if (ncpt > num_online_cpus() || ncpt > 4 * rc) {
                CWARN("CPU partition number %d is larger than suggested "
-                     "value(%d), your system may have performance"
+                     "value (%d), your system may have performance"
                      "issue or run out of memory while under pressure\n",
                      ncpt, rc);
        }
index 89c26c4..e106ee9 100644 (file)
@@ -2790,12 +2790,12 @@ int mdd_readpage(const struct lu_env *env, struct md_object *obj,
                 struct page *pg;
                 struct lu_dirpage *dp;
 
-                /*
-                 * According to POSIX, please do not return any entry to client:
-                 * even dot and dotdot should not be returned.
-                 */
-                CWARN("readdir from dead object: "DFID"\n",
-                        PFID(mdd_object_fid(mdd_obj)));
+               /*
+                * According to POSIX, please do not return any entry to client:
+                * even dot and dotdot should not be returned.
+                */
+               CDEBUG(D_INODE, "readdir from dead object: "DFID"\n",
+                      PFID(mdd_object_fid(mdd_obj)));
 
                 if (rdpg->rp_count <= 0)
                         GOTO(out_unlock, rc = -EFAULT);