From 0b387df6023f651053ab525cbc3f7aba5a87e62c Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Thu, 6 Sep 2012 13:55:41 -0600 Subject: [PATCH] LU-1095 debug: quiet unnecessary console chatter 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 Change-Id: I33afab093e9a03324a579244ce5177708735e7cc Reviewed-on: http://review.whamcloud.com/3894 Reviewed-by: Yu Jian Tested-by: Hudson Tested-by: Maloo Reviewed-by: Liang Zhen Reviewed-by: Oleg Drokin --- libcfs/libcfs/linux/linux-cpu.c | 4 ++-- lustre/mdd/mdd_object.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libcfs/libcfs/linux/linux-cpu.c b/libcfs/libcfs/linux/linux-cpu.c index 3bc7e69..57cf5c7 100644 --- a/libcfs/libcfs/linux/linux-cpu.c +++ b/libcfs/libcfs/linux/linux-cpu.c @@ -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); } diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 89c26c4..e106ee9 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -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); -- 1.8.3.1