* [PATCH] JBD2: round commit timer up to avoid uncommitted transaction
@ 2009-07-27 20:22 Andreas Dilger
2009-07-30 17:47 ` Jan Kara
2009-08-11 2:52 ` Theodore Tso
0 siblings, 2 replies; 5+ messages in thread
From: Andreas Dilger @ 2009-07-27 20:22 UTC (permalink / raw)
To: linux-ext4, Theodore Ts'o; +Cc: Alex Zhuravlev
jbd and jbd2 fixes: 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 expicit sync/umount happens.
Signed-off-by: Alex Zhuravlev (Tomas) <alex.zhuravlev@sun.com>
Signed-off-by: Andreas Dilger <adilger@sun.com>
Index: linux-2.6.27.21-0.1/fs/jbd2/transaction.c
===================================================================
--- linux-2.6.27.21-0.1.orig/fs/jbd2/transaction.c 2009-06-10 11:11:41.000000000 -0600
+++ linux-2.6.27.21-0.1/fs/jbd2/transaction.c 2009-06-10 11:12:32.000000000 -0600
@@ -54,7 +54,7 @@
INIT_LIST_HEAD(&transaction->t_inode_list);
/* 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);
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] JBD2: round commit timer up to avoid uncommitted transaction
2009-07-27 20:22 [PATCH] JBD2: round commit timer up to avoid uncommitted transaction Andreas Dilger
@ 2009-07-30 17:47 ` Jan Kara
2009-07-30 18:00 ` Andreas Dilger
2009-08-11 2:52 ` Theodore Tso
1 sibling, 1 reply; 5+ messages in thread
From: Jan Kara @ 2009-07-30 17:47 UTC (permalink / raw)
To: Andreas Dilger; +Cc: linux-ext4, Theodore Ts'o, Alex Zhuravlev
> jbd and jbd2 fixes: 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 expicit sync/umount happens.
>
> Signed-off-by: Alex Zhuravlev (Tomas) <alex.zhuravlev@sun.com>
> Signed-off-by: Andreas Dilger <adilger@sun.com>
Looks fine. You can add:
Acked-by: Jan Kara <jack@suse.cz>
How about a similar JBD fix?
Honza
> Index: linux-2.6.27.21-0.1/fs/jbd2/transaction.c
> ===================================================================
> --- linux-2.6.27.21-0.1.orig/fs/jbd2/transaction.c 2009-06-10 11:11:41.000000000 -0600
> +++ linux-2.6.27.21-0.1/fs/jbd2/transaction.c 2009-06-10 11:12:32.000000000 -0600
> @@ -54,7 +54,7 @@
> INIT_LIST_HEAD(&transaction->t_inode_list);
>
> /* 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);
>
> Cheers, Andreas
> --
> Andreas Dilger
> Sr. Staff Engineer, Lustre Group
> Sun Microsystems of Canada, Inc.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Jan Kara <jack@suse.cz>
SuSE CR Labs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] JBD2: round commit timer up to avoid uncommitted transaction
2009-07-30 17:47 ` Jan Kara
@ 2009-07-30 18:00 ` Andreas Dilger
2009-07-30 18:11 ` Jan Kara
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Dilger @ 2009-07-30 18:00 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-ext4, Theodore Ts'o, Alex Zhuravlev
On Jul 30, 2009 19:47 +0200, Jan Kara wrote:
> > jbd and jbd2 fixes: 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 expicit sync/umount happens.
> >
> > Signed-off-by: Alex Zhuravlev (Tomas) <alex.zhuravlev@sun.com>
> > Signed-off-by: Andreas Dilger <adilger@sun.com>
>
> Looks fine. You can add:
> Acked-by: Jan Kara <jack@suse.cz>
> How about a similar JBD fix?
Index: linux-2.6.27.21-0.1/fs/jbd/transaction.c
===================================================================
--- linux-2.6.27.21-0.1.orig/fs/jbd/transaction.c 2009-06-10 11:11:41.000000000 -0600
+++ linux-2.6.27.21-0.1/fs/jbd/transaction.c 2009-06-10 11:12:32.000000000 -0600
@@ -54,7 +54,7 @@
spin_lock_init(&transaction->t_inode_list);
/* 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);
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] JBD2: round commit timer up to avoid uncommitted transaction
2009-07-30 18:00 ` Andreas Dilger
@ 2009-07-30 18:11 ` Jan Kara
0 siblings, 0 replies; 5+ messages in thread
From: Jan Kara @ 2009-07-30 18:11 UTC (permalink / raw)
To: Andreas Dilger; +Cc: Jan Kara, linux-ext4, Theodore Ts'o, Alex Zhuravlev
> On Jul 30, 2009 19:47 +0200, Jan Kara wrote:
> > > jbd and jbd2 fixes: 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 expicit sync/umount happens.
> > >
> > > Signed-off-by: Alex Zhuravlev (Tomas) <alex.zhuravlev@sun.com>
> > > Signed-off-by: Andreas Dilger <adilger@sun.com>
> >
> > Looks fine. You can add:
> > Acked-by: Jan Kara <jack@suse.cz>
> > How about a similar JBD fix?
>
> Index: linux-2.6.27.21-0.1/fs/jbd/transaction.c
> ===================================================================
> --- linux-2.6.27.21-0.1.orig/fs/jbd/transaction.c 2009-06-10 11:11:41.000000000 -0600
> +++ linux-2.6.27.21-0.1/fs/jbd/transaction.c 2009-06-10 11:12:32.000000000 -0600
> @@ -54,7 +54,7 @@
> spin_lock_init(&transaction->t_inode_list);
>
> /* 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);
Thanks. Copied over the changelog, added your Signed-off-by and merged
into my tree...
Honza
--
Jan Kara <jack@suse.cz>
SuSE CR Labs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] JBD2: round commit timer up to avoid uncommitted transaction
2009-07-27 20:22 [PATCH] JBD2: round commit timer up to avoid uncommitted transaction Andreas Dilger
2009-07-30 17:47 ` Jan Kara
@ 2009-08-11 2:52 ` Theodore Tso
1 sibling, 0 replies; 5+ messages in thread
From: Theodore Tso @ 2009-08-11 2:52 UTC (permalink / raw)
To: Andreas Dilger; +Cc: linux-ext4, Alex Zhuravlev
On Mon, Jul 27, 2009 at 02:22:09PM -0600, Andreas Dilger wrote:
> jbd and jbd2 fixes: 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 expicit sync/umount happens.
>
> Signed-off-by: Alex Zhuravlev (Tomas) <alex.zhuravlev@sun.com>
> Signed-off-by: Andreas Dilger <adilger@sun.com>
Added to the ext4 patch queue; apologies for the delay.
- Ted
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-11 13:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-27 20:22 [PATCH] JBD2: round commit timer up to avoid uncommitted transaction Andreas Dilger
2009-07-30 17:47 ` Jan Kara
2009-07-30 18:00 ` Andreas Dilger
2009-07-30 18:11 ` Jan Kara
2009-08-11 2:52 ` Theodore Tso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).