From 97df2f4cae374130c057cbf1168ad1427c96cbc5 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Thu, 15 Jan 2015 13:26:43 +0300 Subject: [PATCH] LU-5859 llog: do not cleanup orphans in remote catalogs when a catalog is being processed by the client, just ignore empty llogs, do not try to clean them as the client has no direct access to the storage. Signed-off-by: Alex Zhuravlev Change-Id: Ida933d44475fd392fe3db96bcdd4a05076b63881 Reviewed-on: http://review.whamcloud.com/13414 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: wangdi Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- lustre/obdclass/llog_cat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/obdclass/llog_cat.c b/lustre/obdclass/llog_cat.c index 853b17e..e7114cf 100644 --- a/lustre/obdclass/llog_cat.c +++ b/lustre/obdclass/llog_cat.c @@ -550,9 +550,10 @@ static int llog_cat_process_cb(const struct lu_env *env, } /* clean old empty llogs, do not consider current llog in use */ + /* ignore remote (lgh_obj=NULL) llogs */ hdr = llh->lgh_hdr; if ((hdr->llh_flags & LLOG_F_ZAP_WHEN_EMPTY) && - hdr->llh_count == 1 && + hdr->llh_count == 1 && cat_llh->lgh_obj != NULL && llh != cat_llh->u.chd.chd_current_log) { rc = llog_destroy(env, llh); if (rc) -- 1.8.3.1