From: Giuseppe Di Natale Date: Tue, 18 Jul 2017 21:57:18 +0000 (-0700) Subject: LU-9781 llog: Improve catalog full warning X-Git-Tag: 2.10.53~54 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=1c4900dcd367d2a0b2e6f26796328f5aa12508db;p=fs%2Flustre-release.git LU-9781 llog: Improve catalog full warning 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. Signed-off-by: Giuseppe Di Natale Change-Id: I559e43d08febfd8a1512ceb58fd3030b06372e9f Reviewed-on: https://review.whamcloud.com/28093 Reviewed-by: Faccini Bruno Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Olaf Faaland-LLNL Reviewed-by: Oleg Drokin --- diff --git a/lustre/obdclass/llog_cat.c b/lustre/obdclass/llog_cat.c index 950445a..0d57ce3 100644 --- a/lustre/obdclass/llog_cat.c +++ b/lustre/obdclass/llog_cat.c @@ -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); }