Whamcloud - gitweb
b=4336
[fs/lustre-release.git] / lustre / kernel_patches / patches / jbd-flushtime-2.4.19-suse.patch
1 Index: linux-2.4.19.SuSE/fs/jbd/transaction.c
2 ===================================================================
3 --- linux-2.4.19.SuSE.orig/fs/jbd/transaction.c Sun Nov 16 01:38:25 2003
4 +++ linux-2.4.19.SuSE/fs/jbd/transaction.c      Sun Nov 16 01:44:26 2003
5 @@ -1094,7 +1094,6 @@
6         
7         spin_lock(&journal_datalist_lock);
8         set_bit(BH_JBDDirty, &bh->b_state);
9 -       set_buffer_flushtime(bh);
10  
11         J_ASSERT_JH(jh, jh->b_transaction != NULL);
12         
13 @@ -1995,6 +1994,13 @@
14         spin_unlock(&journal_datalist_lock);
15  }
16  
17 +static void jbd_refile_buffer(struct buffer_head *bh)
18 +{
19 +       if (buffer_dirty(bh) && (bh->b_list != BUF_DIRTY))
20 +               set_buffer_flushtime(bh);
21 +       refile_buffer(bh);
22 +}
23 +
24  /* 
25   * Remove a buffer from its current buffer list in preparation for
26   * dropping it from its current transaction entirely.  If the buffer has
27 @@ -2022,7 +2028,7 @@
28                 J_ASSERT_JH(jh, jh->b_transaction->t_state == T_RUNNING);
29         } else {
30                 /* Onto BUF_DIRTY for writeback */
31 -               refile_buffer(jh2bh(jh));
32 +               jbd_refile_buffer(jh2bh(jh));
33         }
34  }
35