mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
JBD: round commit timer up to avoid uncommitted transaction
Fix jiffie rounding in jbd commit timer setup code. Rounding down could cause the timer to be fired before the corresponding transaction has expired. That transaction can stay not committed forever if no new transaction is created or explicit sync/umount happens. Signed-off-by: Andreas Dilger <adilger@sun.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
ab86e5765d
commit
b449fc6fcc
1 changed files with 2 additions and 1 deletions
|
@ -56,7 +56,8 @@ get_transaction(journal_t *journal, transaction_t *transaction)
|
|||
spin_lock_init(&transaction->t_handle_lock);
|
||||
|
||||
/* Set up the commit timer for the new transaction. */
|
||||
journal->j_commit_timer.expires = round_jiffies(transaction->t_expires);
|
||||
journal->j_commit_timer.expires =
|
||||
round_jiffies_up(transaction->t_expires);
|
||||
add_timer(&journal->j_commit_timer);
|
||||
|
||||
J_ASSERT(journal->j_running_transaction == NULL);
|
||||
|
|
Loading…
Reference in a new issue