[LU-6881] sub_trans_commit_cb() is racy Created: 20/Jul/15 Updated: 13/Aug/15 Resolved: 13/Aug/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Niu Yawei (Inactive) | Assignee: | Di Wang |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
sub_trans_commit_cb() can be called by in parallel, so all_committed could be set to false even if all sub transactions are committed. static void sub_trans_commit_cb(struct lu_env *env, struct thandle *sub_th, struct dt_txn_commit_cb *cb, int err) { struct sub_thandle *st; struct top_multiple_thandle *tmt = cb->dcb_data; bool all_committed = true; ENTRY; /* Check if all sub thandles are committed */ list_for_each_entry(st, &tmt->tmt_sub_thandle_list, st_sub_list) { if (st->st_sub_th == sub_th) { st->st_committed = 1; st->st_result = err; } if (!st->st_committed) all_committed = false; } if (tmt->tmt_result == 0) tmt->tmt_result = err; if (all_committed) top_trans_committed_cb(tmt); top_multiple_thandle_dump(tmt, D_INFO); top_multiple_thandle_put(tmt); RETURN_EXIT; } |
| Comments |
| Comment by Gerrit Updater [ 23/Jul/15 ] |
|
wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/15690 |
| Comment by Gerrit Updater [ 13/Aug/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15690/ |