grab a reference to distrubuted transaction handle before putting on
the list, otherwize the concurrent commit thread can find it and
release, thus the original thread will be accessing just freed
structure.
Test-Parameters: testlist=replay-single,replay-dual
Test-Parameters: testlist=replay-single,replay-dual
Test-Parameters: testlist=replay-single,replay-dual
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I12546b1bce3b3f0fe3c74a99bb589bee39768754
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58112
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
LASSERT(dt != NULL);
tdtd = dt2lu_dev(dt)->ld_site->ls_tgt->lut_tdtd;
+ /* have a reference so the competing commit thread can't release it*/
+ top_multiple_thandle_get(new);
+
spin_lock(&tdtd->tdtd_batchid_lock);
list_for_each_entry_reverse(tmt, &tdtd->tdtd_list, tmt_commit_list) {
if (new->tmt_batchid > tmt->tmt_batchid) {
sub_thandle_register_commit_cb(st, new);
}
- top_multiple_thandle_get(new);
top_multiple_thandle_dump(new, D_INFO);
if (new->tmt_committed && at_head && tdtd->tdtd_commit_task)
wake_up_process(tdtd->tdtd_commit_task);