From: Andreas Dilger <adilger@sun.com>
To: linux-ext4@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>
Cc: Alex Zhuravlev <Alex.Zhuravlev@sun.com>
Subject: [PATCH] JBD2: round commit timer up to avoid uncommitted transaction
Date: Mon, 27 Jul 2009 14:22:09 -0600 [thread overview]
Message-ID: <20090727202209.GU4231@webber.adilger.int> (raw)
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.
next reply other threads:[~2009-07-27 20:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-27 20:22 Andreas Dilger [this message]
2009-07-30 17:47 ` [PATCH] JBD2: round commit timer up to avoid uncommitted transaction Jan Kara
2009-07-30 18:00 ` Andreas Dilger
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=20090727202209.GU4231@webber.adilger.int \
--to=adilger@sun.com \
--cc=Alex.Zhuravlev@sun.com \
--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 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).