* GPL HEADER END
*/
/*
- * Copyright (c) 2015, 2016, Intel Corporation.
+ * Copyright (c) 2015, 2017, Intel Corporation.
*/
/*
* lustre/target/update_trans.c
"lrh_len %u record_size %zu\n", record->lur_hdr.lrh_len,
llog_update_record_size(record));
- if (likely(record->lur_hdr.lrh_len <= ctxt->loc_chunk_size)) {
+ /*
+ * If its size > llog chunk_size, then write current chunk to the update
+ * llog, NB the padding should >= LLOG_MIN_REC_SIZE.
+ *
+ * So check padding length is either >= LLOG_MIN_REC_SIZE or is 0
+ * (record length just matches the chunk size).
+ */
+
+ reclen = record->lur_hdr.lrh_len;
+ if (reclen + LLOG_MIN_REC_SIZE <= ctxt->loc_chunk_size ||
+ reclen == ctxt->loc_chunk_size) {
OBD_ALLOC_PTR(stc);
if (stc == NULL)
GOTO(llog_put, rc = -ENOMEM);
else
eof = true;
- /*
- * If its size > llog chunk_size, then write current chunk to
- * the update llog, NB the padding should >= LLOG_MIN_REC_SIZE.
- *
- * So check padding length is either >= LLOG_MIN_REC_SIZE or is
- * 0 (record length just matches the chunk size).
- */
reclen = __llog_update_record_size(
__update_records_size(next - start));
if ((reclen + LLOG_MIN_REC_SIZE <= ctxt->loc_chunk_size ||
child_th->th_top = &top_th->tt_super;
child_th->th_wait_submit = 1;
top_th->tt_master_sub_thandle = child_th;
-
- top_th->tt_super.th_tags |= child_th->th_tags;
}
return &top_th->tt_super;
}
top_th->tt_master_sub_thandle->th_sync = th->th_sync;
if (th->th_local)
top_th->tt_master_sub_thandle->th_local = th->th_local;
- top_th->tt_master_sub_thandle->th_tags = th->th_tags;
rc = dt_trans_start(env, top_th->tt_master_sub_thandle->th_dev,
top_th->tt_master_sub_thandle);
RETURN(rc);
st->st_sub_th->th_sync = th->th_sync;
if (th->th_local)
st->st_sub_th->th_local = th->th_local;
- st->st_sub_th->th_tags = th->th_tags;
rc = dt_trans_start(env, st->st_sub_th->th_dev,
st->st_sub_th);
if (rc != 0)
top_th->tt_master_sub_thandle->th_sync = th->th_sync;
if (th->th_local)
top_th->tt_master_sub_thandle->th_local = th->th_local;
- top_th->tt_master_sub_thandle->th_tags = th->th_tags;
rc = dt_trans_stop(env, master_dev,
top_th->tt_master_sub_thandle);
OBD_FREE_PTR(top_th);
master_st->st_sub_th->th_local = th->th_local;
if (th->th_sync)
master_st->st_sub_th->th_sync = th->th_sync;
- master_st->st_sub_th->th_tags = th->th_tags;
master_st->st_sub_th->th_result = th->th_result;
rc = dt_trans_stop(env, master_st->st_dt, master_st->st_sub_th);
/* If it does not write_updates, then we call submit callback
st->st_sub_th->th_sync = th->th_sync;
if (th->th_local)
st->st_sub_th->th_local = th->th_local;
- st->st_sub_th->th_tags = th->th_tags;
st->st_sub_th->th_result = th->th_result;
rc = dt_trans_stop(env, st->st_sub_th->th_dev,
st->st_sub_th);
th = dt_trans_create(env, tdtd->tdtd_lut->lut_bottom);
if (IS_ERR(th)) {
+ atomic_dec(&tdtd->tdtd_refcount);
OBD_FREE_PTR(dtbd);
RETURN(PTR_ERR(th));
}
stop:
dt_trans_stop(env, tdtd->tdtd_lut->lut_bottom, th);
- if (rc < 0)
+ if (rc < 0) {
+ atomic_dec(&tdtd->tdtd_refcount);
OBD_FREE_PTR(dtbd);
+ }
RETURN(rc);
}
if (rc != 0)
RETURN(rc);
- task = kthread_run(distribute_txn_commit_thread, tdtd, "tdtd-%u",
+ task = kthread_run(distribute_txn_commit_thread, tdtd, "dist_txn-%u",
index);
if (IS_ERR(task))
RETURN(PTR_ERR(task));