Whamcloud - gitweb
LU-5859 llog: do not cleanup orphans in remote catalogs 14/13414/3
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Thu, 15 Jan 2015 10:26:43 +0000 (13:26 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 25 Jan 2015 01:52:42 +0000 (01:52 +0000)
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 <alexey.zhuravlev@intel.com>
Change-Id: Ida933d44475fd392fe3db96bcdd4a05076b63881
Reviewed-on: http://review.whamcloud.com/13414
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/llog_cat.c

index 853b17e..e7114cf 100644 (file)
@@ -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)