Whamcloud - gitweb
LU-10392 fid: improve seq allocation error messages 13/30813/3
authorEmoly Liu <emoly.liu@intel.com>
Wed, 20 Dec 2017 09:32:37 +0000 (17:32 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Mon, 26 Feb 2018 18:43:56 +0000 (18:43 +0000)
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 <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30813
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/fid/fid_handler.c
lustre/fid/fid_request.c

index 537ea6d..ef61772 100644 (file)
@@ -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);
        }
 
index 28a6b1e..72c7efd 100644 (file)
@@ -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);