Bug in data journaling patch ?!
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · Vijayan Prabhakaran
Bug description:
------------------
Injournal.cthere is a function calleddo_journal_end(). There is line in that function that initializescommit_trans_id. It looks like:
commit_trans_id=jl->j_trans_id;The value of
jl->j_trans_idwas 0 (this could be due to somememset()).
This would indeed be a bug, but it's not clear how jl->j_trans_id becomes zero.
A little farther down in do_journal_end, we set SB_JOURNAL()->j_current_jl->j_trans_id to the transaction id of the next transaction. It should be impossible for it to ever be zero.
The only exception looks like the very first transaction for each mount. The journal_init function doesn't set j_current_jl->j_trans_id to a non-zero value.
Can you confirm that you're only seeing this problem on the first transaction?
-chris
Yes, this happens only on the first transaction after the mount. For all other later transactions it works fine.
thanks,
vijayan
Quoted 29 lines · Chris Mason
Quoted 9 lines · Vijayan Prabhakaran
Bug description:
------------------
Injournal.cthere is a function calleddo_journal_end(). There is line in that function that initializescommit_trans_id. It looks like:
commit_trans_id=jl->j_trans_id;The value of
jl->j_trans_idwas 0 (this could be due to somememset()).This would indeed be a bug, but it's not clear how
jl->j_trans_idbecomes zero.A little farther down in
do_journal_end, we set SB_JOURNAL()->j_current_jl->j_trans_id to the transaction id of the next transaction. It should be impossible for it to ever be zero.The only exception looks like the very first transaction for each mount. The
journal_initfunction doesn't setj_current_jl->j_trans_idto a non-zero value.Can you confirm that you're only seeing this problem on the first transaction?
-chris
Quoted 2 lines · Vijayan Prabhakaran
Yes, this happens only on the first transaction after the mount. For all other later transactions it works fine.
Perfect, thanks for the verification, I'll cook up patches for both 2.6.x and 2.4.x.
-chris