#include <lustre_update.h>
#include <obd.h>
#include <obd_class.h>
+#include <tgt_internal.h>
/**
* Create the top transaction.
top_th->tt_magic = TOP_THANDLE_MAGIC;
top_th->tt_master_sub_thandle = child_th;
child_th->th_top = &top_th->tt_super;
- INIT_LIST_HEAD(&top_th->tt_sub_thandle_list);
+
+ top_th->tt_update_records = NULL;
top_th->tt_super.th_top = &top_th->tt_super;
+ INIT_LIST_HEAD(&top_th->tt_sub_thandle_list);
return &top_th->tt_super;
}
struct top_thandle *top_th = container_of(th, struct top_thandle,
tt_super);
struct sub_thandle *lst;
- int rc = 0;
+ int rc;
+
+ rc = check_and_prepare_update_record(env, th);
+ if (rc < 0)
+ return rc;
LASSERT(top_th->tt_magic == TOP_THANDLE_MAGIC);
list_for_each_entry(lst, &top_th->tt_sub_thandle_list, st_sub_list) {
struct sub_thandle *lst;
struct top_thandle *top_th = container_of(th, struct top_thandle,
tt_super);
+ struct thandle_update_records *tur = top_th->tt_update_records;
int rc;
ENTRY;
/* Note: we always need walk through all of sub_transaction to do
* transaction stop to release the resource here */
+ if (tur != NULL) {
+ rc = merge_params_updates_buf(env, tur);
+ if (rc == 0) {
+ struct update_records *record;
+
+ record = &tur->tur_update_records->lur_update_rec;
+ update_records_dump(record, D_INFO, false);
+ }
+ }
+
LASSERT(top_th->tt_magic == TOP_THANDLE_MAGIC);
top_th->tt_master_sub_thandle->th_local = th->th_local;
INIT_LIST_HEAD(&lst->st_sub_list);
lst->st_sub_th = sub_th;
list_add(&lst->st_sub_list, &top_th->tt_sub_thandle_list);
+ lst->st_record_update = 1;
RETURN(sub_th);
}