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

Note: the fix for sles11 kernel is added although  there is no sles11 series
on HEAD yet.

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.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..38bc3fc
--- /dev/null
@@ -0,0 +1,13 @@
+Index: linux-2.6.22.14/fs/jbd/transaction.c
+===================================================================
+--- linux-2.6.22.14.orig/fs/jbd/transaction.c  2009-06-12 09:40:42.000000000 +0400
++++ linux-2.6.22.14/fs/jbd/transaction.c       2009-06-12 09:40:43.000000000 +0400
+@@ -56,7 +56,7 @@ get_transaction(journal_t *journal, tran
+       spin_lock_init(&transaction->t_jcb_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 9f45f51..ea0218f 100644 (file)
@@ -12,3 +12,4 @@ export-show_task-2.6.18-vanilla.patch
 sd_iostats-2.6.22-vanilla.patch
 quota-large-limits-rhel5.patch
 raid5-mmp-unplug-dev.patch
+jbd-commit-timer-no-jiffies-rounding.diff