-int llog_cat_initialize(struct obd_device *obd, struct obd_llog_group *olg,
- int idx, struct obd_uuid *uuid)
-{
- char name[32] = CATLIST;
- struct llog_catid idarray;
- int rc;
- ENTRY;
-
- mutex_down(&olg->olg_cat_processing);
- rc = llog_get_cat_list(obd, obd, name, idx, 1, &idarray);
- if (rc) {
- CERROR("rc: %d\n", rc);
- GOTO(out, rc);
- }
-
- CDEBUG(D_INFO, "%s: Init llog for %s/%d - catid "LPX64"/"LPX64":%x\n",
- obd->obd_name, uuid->uuid, idx, idarray.lci_logid.lgl_oid,
- idarray.lci_logid.lgl_ogr, idarray.lci_logid.lgl_ogen);
-
- rc = obd_llog_init(obd, olg, obd, 1, &idarray, uuid);
- if (rc) {
- CERROR("rc: %d\n", rc);
- GOTO(out, rc);
- }
-
- rc = llog_put_cat_list(obd, obd, name, idx, 1, &idarray);
- if (rc) {
- CERROR("rc: %d\n", rc);
- GOTO(out, rc);
- }
-
- out:
- mutex_up(&olg->olg_cat_processing);
-
- RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cat_initialize);
-