From 1c4900dcd367d2a0b2e6f26796328f5aa12508db Mon Sep 17 00:00:00 2001 From: Giuseppe Di Natale Date: Tue, 18 Jul 2017 14:57:18 -0700 Subject: [PATCH] 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 --- lustre/obdclass/llog_cat.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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); } -- 1.8.3.1