From 1b3752c0484d95e7a8a801619935a8ce8f493ab9 Mon Sep 17 00:00:00 2001 From: zam Date: Fri, 12 Jun 2009 05:33:40 +0000 Subject: [PATCH] Branch b1_8 b=19321 i=johann i=alex.zhuravlev jbd and jbd2 fixes: remove jiffie rounding from jbd commit timer setup code. The rounding can cause the timer to be fired before the corresponding transaction gets expired. That transaction can stay not committed forever if no new transaction is created or expicit sync/umount happens. --- .../patches/jbd-commit-timer-no-jiffies-rounding.diff | 13 +++++++++++++ .../patches/jbd2-commit-timer-no-jiffies-rounding.diff | 13 +++++++++++++ lustre/kernel_patches/series/2.6-sles11.series | 1 + lustre/kernel_patches/series/2.6.22-vanilla.series | 1 + 4 files changed, 28 insertions(+) create mode 100644 lustre/kernel_patches/patches/jbd-commit-timer-no-jiffies-rounding.diff create mode 100644 lustre/kernel_patches/patches/jbd2-commit-timer-no-jiffies-rounding.diff diff --git a/lustre/kernel_patches/patches/jbd-commit-timer-no-jiffies-rounding.diff b/lustre/kernel_patches/patches/jbd-commit-timer-no-jiffies-rounding.diff new file mode 100644 index 0000000..d0b7e7a --- /dev/null +++ b/lustre/kernel_patches/patches/jbd-commit-timer-no-jiffies-rounding.diff @@ -0,0 +1,13 @@ +Index: linux-2.6/fs/jbd/transaction.c +=================================================================== +--- linux-2.6.orig/fs/jbd/transaction.c 2009-06-10 20:07:51.000000000 +0400 ++++ linux-2.6/fs/jbd/transaction.c 2009-06-10 20:08:03.000000000 +0400 +@@ -56,7 +56,7 @@ get_transaction(journal_t *journal, tran + 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 = transaction->t_expires; + add_timer(&journal->j_commit_timer); + + J_ASSERT(journal->j_running_transaction == NULL); diff --git a/lustre/kernel_patches/patches/jbd2-commit-timer-no-jiffies-rounding.diff b/lustre/kernel_patches/patches/jbd2-commit-timer-no-jiffies-rounding.diff new file mode 100644 index 0000000..e809572 --- /dev/null +++ b/lustre/kernel_patches/patches/jbd2-commit-timer-no-jiffies-rounding.diff @@ -0,0 +1,13 @@ +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 = transaction->t_expires; + add_timer(&journal->j_commit_timer); + + J_ASSERT(journal->j_running_transaction == NULL); diff --git a/lustre/kernel_patches/series/2.6-sles11.series b/lustre/kernel_patches/series/2.6-sles11.series index 298cf0a..860be33 100644 --- a/lustre/kernel_patches/series/2.6-sles11.series +++ b/lustre/kernel_patches/series/2.6-sles11.series @@ -10,3 +10,4 @@ sd_iostats-2.6.27-vanilla.patch md-mmp-unplug-dev-sles11.patch quota-support-64-bit-quota-format.patch jbd2-jcberr-2.6-sles11.patch +jbd2-commit-timer-no-jiffies-rounding.diff diff --git a/lustre/kernel_patches/series/2.6.22-vanilla.series b/lustre/kernel_patches/series/2.6.22-vanilla.series index c8df852..53997ba 100644 --- a/lustre/kernel_patches/series/2.6.22-vanilla.series +++ b/lustre/kernel_patches/series/2.6.22-vanilla.series @@ -11,3 +11,4 @@ export-show_task-2.6.18-vanilla.patch sd_iostats-2.6.22-vanilla.patch quota-large-limits-rhel5.patch md-mmp-unplug-dev.patch +jbd-commit-timer-no-jiffies-rounding.diff -- 1.8.3.1