Skip to contentSkip to conversation

Bug in data journaling patch ?!

DISCUSSION Chris Mason 2 participants 3 messages Aug 16, 2004 – Aug 17, 2004 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 9 lines · Vijayan Prabhakaran

Bug description:
------------------
In journal.c there is a function called do_journal_end(). There is line in that function that initializes commit_trans_id. It looks like:

commit_trans_id = jl->j_trans_id;

The value of jl->j_trans_id was 0 (this could be due to some memset()).

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

#2 lore raw

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:
------------------
In journal.c there is a function called do_journal_end(). There is line in that function that initializes commit_trans_id. It looks like:

commit_trans_id = jl->j_trans_id;

The value of jl->j_trans_id was 0 (this could be due to some memset()).

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

#3 lore raw
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