* GPL HEADER END
*/
/*
- * Copyright (c) 2014, Intel Corporation.
+ * Copyright (c) 2015, Intel Corporation.
*/
/*
* lustre/lod/lod_sub_object.c
if (rc < 0)
RETURN(ERR_PTR(rc));
- if (type == LU_SEQ_RANGE_OST)
+ /* th_complex means we need track all of updates for this
+ * transaction, include changes on OST */
+ if (type == LU_SEQ_RANGE_OST && !th->th_complex)
RETURN(tth->tt_master_sub_thandle);
sub_th = thandle_get_sub(env, th, sub_obj);
}
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 != 0)
GOTO(out_close, rc);
GOTO(out_close, rc);
}
+ ctxt->loc_handle = lgh;
+
CDEBUG(D_INFO, "%s: Init llog for %d - catid "DOSTID":%x\n",
obd->obd_name, index, POSTID(&cid->lci_logid.lgl_oi),
cid->lci_logid.lgl_ogen);
out_close:
- if (rc != 0) {
- llog_cat_close(env, ctxt->loc_handle);
- ctxt->loc_handle = NULL;
- }
-
+ if (rc != 0)
+ llog_cat_close(env, lgh);
out_put:
llog_ctxt_put(ctxt);
RETURN(rc);