From: Emoly Liu Date: Wed, 20 Dec 2017 09:32:37 +0000 (+0800) Subject: LU-10392 fid: improve seq allocation error messages X-Git-Tag: 2.10.4-RC1~96 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=bb23c0343473376cd103de869e8a39ca1abf0f0a;p=fs%2Flustre-release.git LU-10392 fid: improve seq allocation error messages When MDTs are waiting for MDT0000 to start the master sequence server and be granted a meta sequence for the first time, in case of "-EINPROGRESS", the limited console messages would be clearer and better than many error messages. Lustre-change: https://review.whamcloud.com/30623 Lustre-commit: 6f86519b3483b4cc754b42bddc98617de14cef2b Change-Id: I64e80508cf9fb837a328b4f8228f29bfb764845d Signed-off-by: Emoly Liu Reviewed-by: Andreas Dilger Reviewed-by: Yang Sheng Reviewed-by: Giuseppe Di Natale Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/30813 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond --- diff --git a/lustre/fid/fid_handler.c b/lustre/fid/fid_handler.c index 537ea6d..ef61772 100644 --- a/lustre/fid/fid_handler.c +++ b/lustre/fid/fid_handler.c @@ -325,8 +325,17 @@ static int __seq_server_alloc_meta(struct lu_server_seq *seq, rc = seq_server_check_and_alloc_super(env, seq); if (rc < 0) { - CERROR("%s: Allocated super-sequence failed: rc = %d\n", - seq->lss_name, rc); + if (rc == -EINPROGRESS) { + static int printed; + + if (printed++ % 8 == 0) + LCONSOLE_INFO("%s: Waiting to contact MDT0000 " + "to allocate super-sequence\n", + seq->lss_name); + } else { + CERROR("%s: Allocated super-sequence failed: rc = %d\n", + seq->lss_name, rc); + } RETURN(rc); } diff --git a/lustre/fid/fid_request.c b/lustre/fid/fid_request.c index 28a6b1e..72c7efd 100644 --- a/lustre/fid/fid_request.c +++ b/lustre/fid/fid_request.c @@ -223,8 +223,9 @@ static int seq_client_alloc_seq(const struct lu_env *env, if (lu_seq_range_is_exhausted(&seq->lcs_space)) { rc = seq_client_alloc_meta(env, seq); if (rc) { - CERROR("%s: Can't allocate new meta-sequence," - "rc %d\n", seq->lcs_name, rc); + if (rc != -EINPROGRESS) + CERROR("%s: Can't allocate new meta-sequence," + "rc = %d\n", seq->lcs_name, rc); RETURN(rc); } else { CDEBUG(D_INFO, "%s: New range - "DRANGE"\n", @@ -379,8 +380,9 @@ int seq_client_alloc_fid(const struct lu_env *env, /* Re-take seq::lcs_mutex via seq_fid_alloc_fini(). */ seq_fid_alloc_fini(seq, rc ? 0 : seqnr, false); if (rc) { - CERROR("%s: Can't allocate new sequence: rc = %d\n", - seq->lcs_name, rc); + if (rc != -EINPROGRESS) + CERROR("%s: Can't allocate new sequence: " + "rc = %d\n", seq->lcs_name, rc); mutex_unlock(&seq->lcs_mutex); RETURN(rc);