Whamcloud - gitweb
LU-1187 tests: Add DNE test cases in sanity.
[fs/lustre-release.git] / lustre / kernel_patches / patches / jbd2_stats_proc_init-wrong-place.patch
1 From 42e140bf105aea1c9679b1cd128aebc35196e6fc Mon Sep 17 00:00:00 2001
2 From: yangsheng <sheng.yang@oracle.com>
3 Date: Mon, 15 Nov 2010 21:26:35 +0800
4 Subject: [PATCH]  jbd2_stats_proc_init wrong place.
5
6  The jbd2_stats_proc_init() was placed on wrong location in
7  jbd2_journal_init_dev().  This may cause /proc/fs/jdb2/<dev>/*
8  cannot be created when using external journal device.
9
10  Reviewed-by: Andreas Dilger <andreas.dilger@oracle.com>
11
12 ---
13 ---
14  fs/jbd2/journal.c |   16 ++++++++--------
15  1 files changed, 8 insertions(+), 8 deletions(-)
16
17 diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
18 index c590d15..f837ba9 100644
19 --- a/fs/jbd2/journal.c
20 +++ b/fs/jbd2/journal.c
21 @@ -899,6 +899,14 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
22  
23         /* journal descriptor can store up to n blocks -bzzz */
24         journal->j_blocksize = blocksize;
25 +       journal->j_dev = bdev;
26 +       journal->j_fs_dev = fs_dev;
27 +       journal->j_blk_offset = start;
28 +       journal->j_maxlen = len;
29 +       bdevname(journal->j_dev, journal->j_devname);
30 +       p = journal->j_devname;
31 +       while ((p = strchr(p, '/')))
32 +               *p = '!';
33         jbd2_stats_proc_init(journal);
34         n = journal->j_blocksize / sizeof(journal_block_tag_t);
35         journal->j_wbufsize = n;
36 @@ -908,14 +916,6 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev,
37                         __func__);
38                 goto out_err;
39         }
40 -       journal->j_dev = bdev;
41 -       journal->j_fs_dev = fs_dev;
42 -       journal->j_blk_offset = start;
43 -       journal->j_maxlen = len;
44 -       bdevname(journal->j_dev, journal->j_devname);
45 -       p = journal->j_devname;
46 -       while ((p = strchr(p, '/')))
47 -               *p = '!';
48  
49         bh = __getblk(journal->j_dev, start, journal->j_blocksize);
50         if (!bh) {
51 -- 
52 1.7.2.3
53