Whamcloud - gitweb
LU-9781 llog: Improve catalog full warning 15/28815/2
authorGiuseppe Di Natale <dinatale2@llnl.gov>
Tue, 18 Jul 2017 21:57:18 +0000 (14:57 -0700)
committerJohn L. Hammond <john.hammond@intel.com>
Wed, 6 Sep 2017 17:01:13 +0000 (17:01 +0000)
When warning that a catalog file is full, provide the name
of the catalog file. If the name of catalog file isn't
defined, print its FID.

Lustre-change: https://review.whamcloud.com/28093
Lustre-commit: 1c4900dcd367d2a0b2e6f26796328f5aa12508db

Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Change-Id: I559e43d08febfd8a1512ceb58fd3030b06372e9f
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28815
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/obdclass/llog_cat.c

index b6b29eb..d97b62d 100644 (file)
@@ -85,8 +85,18 @@ static int llog_cat_new_log(const struct lu_env *env,
         * last_idx and cat_idx */
        if ((index == llh->llh_cat_idx + 1 && llh->llh_count > 1) ||
            (index == 0 && llh->llh_cat_idx == 0)) {
-               CWARN("%s: there are no more free slots in catalog\n",
-                     loghandle->lgh_ctxt->loc_obd->obd_name);
+               if (cathandle->lgh_name == NULL) {
+                       CWARN("%s: there are no more free slots in catalog "
+                             DFID":%x\n",
+                             loghandle->lgh_ctxt->loc_obd->obd_name,
+                             PFID(&cathandle->lgh_id.lgl_oi.oi_fid),
+                             cathandle->lgh_id.lgl_ogen);
+               } else {
+                       CWARN("%s: there are no more free slots in "
+                             "catalog %s\n",
+                             loghandle->lgh_ctxt->loc_obd->obd_name,
+                             cathandle->lgh_name);
+               }
                RETURN(-ENOSPC);
        }