From a8e357a12d37ef0e231625e22999246f9f4bb531 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Fri, 5 Aug 2011 17:54:40 +0800 Subject: [PATCH] LU-429 Fix and quiet debug message in filter_connect The comment refers to mds_connect(), which no longer exits. So I just removed the comment. The message says "Received MDS connection", but this function is used when clients connect to OSTs as well. We don't need to see this message on the console all of the time, so I changed it to D_INFO. Change-Id: Iebfbaafe39df702862ade126b979528855173d5c Signed-off-by: Christopher J. Morrone Signed-off-by: Yang Sheng Reviewed-on: http://review.whamcloud.com/963 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/obdfilter/filter.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index ad44312..cb1b787 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -2692,8 +2692,10 @@ static int filter_connect_internal(struct obd_export *exp, data->ocd_version = LUSTRE_VERSION_CODE; /* Kindly make sure the SKIP_ORPHAN flag is from MDS. */ - if (!ergo(data->ocd_connect_flags & OBD_CONNECT_SKIP_ORPHAN, - data->ocd_connect_flags & OBD_CONNECT_MDS)) + if (data->ocd_connect_flags & OBD_CONNECT_MDS) + CWARN("%s: Received MDS connection for group %u\n", + exp->exp_obd->obd_name, data->ocd_group); + else if (data->ocd_connect_flags & OBD_CONNECT_SKIP_ORPHAN) RETURN(-EPROTO); if (exp->exp_connect_flags & OBD_CONNECT_GRANT) { @@ -2810,7 +2812,6 @@ static int filter_reconnect(const struct lu_env *env, RETURN(rc); } -/* nearly identical to mds_connect */ static int filter_connect(const struct lu_env *env, struct obd_export **exp, struct obd_device *obd, struct obd_uuid *cluuid, @@ -2819,7 +2820,6 @@ static int filter_connect(const struct lu_env *env, struct lvfs_run_ctxt saved; struct lustre_handle conn = { 0 }; struct obd_export *lexp; - __u32 group; int rc; ENTRY; @@ -2846,16 +2846,11 @@ static int filter_connect(const struct lu_env *env, GOTO(cleanup, rc); } - group = data->ocd_group; - - CWARN("%s: Received MDS connection ("LPX64"); group %d\n", - obd->obd_name, lexp->exp_handle.h_cookie, group); - push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); - rc = filter_read_groups(obd, group, 1); + rc = filter_read_groups(obd, data->ocd_group, 1); pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); if (rc != 0) { - CERROR("can't read group %u\n", group); + CERROR("can't read group %u\n", data->ocd_group); GOTO(cleanup, rc); } -- 1.8.3.1