From: zam Date: Fri, 12 Jun 2009 05:45:53 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_9_220~150 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c93c7ba4b76ccd7e37fd429e032fef1186d5958c;p=fs%2Flustre-release.git Branch HEAD 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. --- 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..38bc3fc --- /dev/null +++ b/lustre/kernel_patches/patches/jbd-commit-timer-no-jiffies-rounding.diff @@ -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 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.22-vanilla.series b/lustre/kernel_patches/series/2.6.22-vanilla.series index 9f45f51..ea0218f 100644 --- a/lustre/kernel_patches/series/2.6.22-vanilla.series +++ b/lustre/kernel_patches/series/2.6.22-vanilla.series @@ -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