Whamcloud - gitweb
Branch b1_8
authorzam <zam>
Fri, 12 Jun 2009 05:33:40 +0000 (05:33 +0000)
committerzam <zam>
Fri, 12 Jun 2009 05:33:40 +0000 (05:33 +0000)
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.

lustre/kernel_patches/patches/jbd-commit-timer-no-jiffies-rounding.diff [new file with mode: 0644]
lustre/kernel_patches/patches/jbd2-commit-timer-no-jiffies-rounding.diff [new file with mode: 0644]
lustre/kernel_patches/series/2.6-sles11.series
lustre/kernel_patches/series/2.6.22-vanilla.series

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 (file)
index 0000000..d0b7e7a
--- /dev/null
@@ -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 (file)
index 0000000..e809572
--- /dev/null
@@ -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);
index 298cf0a..860be33 100644 (file)
@@ -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
index c8df852..53997ba 100644 (file)
@@ -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