Whamcloud - gitweb
LU-8079 llog: Remove llog_cat_init_and_process 50/19850/4
authorHenri Doreau <henri.doreau@cea.fr>
Thu, 28 Apr 2016 11:01:16 +0000 (13:01 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 16 May 2016 16:48:10 +0000 (16:48 +0000)
Unlike name suggests, this function does no longer process
the log but only initialize it. Replace it by direct calls
to the function it wraps.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: Ib48e7d4cb15a2433cc07c6760e25450a9aa0a3b3
Reviewed-on: http://review.whamcloud.com/19850
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_log.h
lustre/lod/lod_sub_object.c
lustre/mdd/mdd_device.c
lustre/obdclass/llog_cat.c
lustre/osp/osp_sync.c

index d31a1d1..28dcbf2 100644 (file)
@@ -163,9 +163,6 @@ __u64 llog_cat_size(const struct lu_env *env, struct llog_handle *cat_llh);
 int llog_cat_reverse_process(const struct lu_env *env,
                             struct llog_handle *cat_llh, llog_cb_t cb,
                             void *data);
-int llog_cat_init_and_process(const struct lu_env *env,
-                             struct llog_handle *llh);
-
 /* llog_obd.c */
 int llog_setup(const struct lu_env *env, struct obd_device *obd,
               struct obd_llog_group *olg, int index,
index 61bb9fc..4096bf5 100644 (file)
@@ -986,7 +986,7 @@ int lod_sub_prep_llog(const struct lu_env *env, struct lod_device *lod,
 
        LASSERT(lgh != NULL);
 
-       rc = llog_cat_init_and_process(env, lgh);
+       rc = llog_init_handle(env, lgh, LLOG_F_IS_CAT, NULL);
        if (rc != 0)
                GOTO(out_close, rc);
 
index 35a4529..93b0c91 100644 (file)
@@ -340,7 +340,7 @@ static int mdd_changelog_llog_init(const struct lu_env *env,
        if (rc)
                GOTO(out_cleanup, rc);
 
-       rc = llog_cat_init_and_process(env, ctxt->loc_handle);
+       rc = llog_init_handle(env, ctxt->loc_handle, LLOG_F_IS_CAT, NULL);
        if (rc)
                GOTO(out_close, rc);
 
@@ -376,7 +376,7 @@ static int mdd_changelog_llog_init(const struct lu_env *env,
        uctxt->loc_handle->lgh_logops->lop_add = llog_cat_add_rec;
        uctxt->loc_handle->lgh_logops->lop_declare_add = llog_cat_declare_add_rec;
 
-       rc = llog_cat_init_and_process(env, uctxt->loc_handle);
+       rc = llog_init_handle(env, uctxt->loc_handle, LLOG_F_IS_CAT, NULL);
        if (rc)
                GOTO(out_uclose, rc);
 
@@ -836,7 +836,7 @@ static int mdd_hsm_actions_llog_init(const struct lu_env *env,
                GOTO(out_cleanup, rc);
        }
 
-       rc = llog_cat_init_and_process(env, ctxt->loc_handle);
+       rc = llog_init_handle(env, ctxt->loc_handle, LLOG_F_IS_CAT, NULL);
        if (rc)
                GOTO(out_close, rc);
 
index 5fdee1f..921c9cb 100644 (file)
@@ -1070,17 +1070,3 @@ int llog_cat_cleanup(const struct lu_env *env, struct llog_handle *cathandle,
                       index, POSTID(&cathandle->lgh_id.lgl_oi));
        return rc;
 }
-
-/* helper to initialize catalog llog and process it to cancel */
-int llog_cat_init_and_process(const struct lu_env *env,
-                             struct llog_handle *llh)
-{
-       int rc;
-
-       rc = llog_init_handle(env, llh, LLOG_F_IS_CAT, NULL);
-       if (rc)
-               RETURN(rc);
-
-       RETURN(0);
-}
-EXPORT_SYMBOL(llog_cat_init_and_process);
index d7520f3..2c74443 100644 (file)
@@ -1313,7 +1313,7 @@ static int osp_sync_llog_init(const struct lu_env *env, struct osp_device *d)
        LASSERT(lgh != NULL);
        ctxt->loc_handle = lgh;
 
-       rc = llog_cat_init_and_process(env, lgh);
+       rc = llog_init_handle(env, lgh, LLOG_F_IS_CAT, NULL);
        if (rc)
                GOTO(out_close, rc);