From: Andreas Dilger <adilger@sun.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>,
Alex Zhuravlev <Alex.Zhuravlev@sun.com>
Subject: Re: [PATCH] JBD2: round commit timer up to avoid uncommitted transaction
Date: Thu, 30 Jul 2009 12:00:35 -0600 [thread overview]
Message-ID: <20090730180035.GC4231@webber.adilger.int> (raw)
In-Reply-To: <20090730174710.GB9223@atrey.karlin.mff.cuni.cz>
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.
next prev parent reply other threads:[~2009-07-30 18:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2009-07-30 18:11 ` Jan Kara
2009-08-11 2:52 ` Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090730180035.GC4231@webber.adilger.int \
--to=adilger@sun.com \
--cc=Alex.Zhuravlev@sun.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.