From: yangsheng Date: Mon, 15 Nov 2010 14:43:46 +0000 (+0800) Subject: b=23985 Fix upstream jbd2 code issue. X-Git-Tag: 1.8.5 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=7ab43424bec0f75c62c72033d802caa380fb64b7;p=fs%2Flustre-release.git b=23985 Fix upstream jbd2 code issue. The jbd2_stats_proc_init() was placed on wrong location in jbd2_journal_init_dev(). This may cause /proc/fs/jdb2//* cannot be created when using external journal device. i=adilger i=johann --- diff --git a/lustre/kernel_patches/patches/jbd2_stats_proc_init-wrong-place.patch b/lustre/kernel_patches/patches/jbd2_stats_proc_init-wrong-place.patch new file mode 100644 index 0000000..a37c894 --- /dev/null +++ b/lustre/kernel_patches/patches/jbd2_stats_proc_init-wrong-place.patch @@ -0,0 +1,53 @@ +From 42e140bf105aea1c9679b1cd128aebc35196e6fc Mon Sep 17 00:00:00 2001 +From: yangsheng +Date: Mon, 15 Nov 2010 21:26:35 +0800 +Subject: [PATCH] jbd2_stats_proc_init wrong place. + + The jbd2_stats_proc_init() was placed on wrong location in + jbd2_journal_init_dev(). This may cause /proc/fs/jdb2//* + cannot be created when using external journal device. + + Reviewed-by: Andreas Dilger + +--- +--- + fs/jbd2/journal.c | 16 ++++++++-------- + 1 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c +index c590d15..f837ba9 100644 +--- a/fs/jbd2/journal.c ++++ b/fs/jbd2/journal.c +@@ -899,6 +899,14 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev, + + /* journal descriptor can store up to n blocks -bzzz */ + journal->j_blocksize = blocksize; ++ journal->j_dev = bdev; ++ journal->j_fs_dev = fs_dev; ++ journal->j_blk_offset = start; ++ journal->j_maxlen = len; ++ bdevname(journal->j_dev, journal->j_devname); ++ p = journal->j_devname; ++ while ((p = strchr(p, '/'))) ++ *p = '!'; + jbd2_stats_proc_init(journal); + n = journal->j_blocksize / sizeof(journal_block_tag_t); + journal->j_wbufsize = n; +@@ -908,14 +916,6 @@ journal_t * jbd2_journal_init_dev(struct block_device *bdev, + __func__); + goto out_err; + } +- journal->j_dev = bdev; +- journal->j_fs_dev = fs_dev; +- journal->j_blk_offset = start; +- journal->j_maxlen = len; +- bdevname(journal->j_dev, journal->j_devname); +- p = journal->j_devname; +- while ((p = strchr(p, '/'))) +- *p = '!'; + + bh = __getblk(journal->j_dev, start, journal->j_blocksize); + if (!bh) { +-- +1.7.2.3 + diff --git a/lustre/kernel_patches/series/2.6-rhel5.series b/lustre/kernel_patches/series/2.6-rhel5.series index 2103fec..5f60cc2 100644 --- a/lustre/kernel_patches/series/2.6-rhel5.series +++ b/lustre/kernel_patches/series/2.6-rhel5.series @@ -25,3 +25,4 @@ mpt-fusion-max-sge.patch jbd2-jcberr-2.6-rhel5.patch jbd2-commit-timer-no-jiffies-rounding.diff md-avoid-bug_on-when-bmc-overflow.patch +jbd2_stats_proc_init-wrong-place.patch diff --git a/lustre/kernel_patches/series/2.6-sles11.series b/lustre/kernel_patches/series/2.6-sles11.series index 8405f1e..1030c8f 100644 --- a/lustre/kernel_patches/series/2.6-sles11.series +++ b/lustre/kernel_patches/series/2.6-sles11.series @@ -9,3 +9,4 @@ sd_iostats-2.6.32-vanilla.patch md-mmp-unplug-dev-sles11.patch quota-support-64-bit-quota-format.patch jbd2-jcberr-2.6-sles11.patch +jbd2_stats_proc_init-wrong-place.patch