From 7abee7f5e32a2ff60bf2890a17ab5431109a9f56 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Wed, 22 Feb 2012 18:27:42 +0800 Subject: [PATCH] LU-1052 kernel: Kernel update [RHEL5.8 2.6.18-308.1.1.el5] Update RHEL5.8 kernel to 2.6.18-308.1.1.el5. Signed-off-by: yang sheng Change-Id: Id8394bc1cb57d9555e4cda1312200a23b0915c84 Reviewed-on: http://review.whamcloud.com/2175 Reviewed-by: Johann Lombardi Tested-by: Hudson Reviewed-by: Bobi Jam Tested-by: Maloo Reviewed-by: James Simmons --- lustre/ChangeLog | 6 +++++- .../kernel-2.6.18-2.6-rhel5-i686.config | 6 ++---- .../kernel-2.6.18-2.6-rhel5-x86_64.config | 6 ++---- .../jbd-journal-chksum-2.6.18-vanilla.patch | 18 ++++++++++------- .../md-avoid-bug_on-when-bmc-overflow.patch | 17 ---------------- .../patches/raid5-zerocopy-rhel5.patch | 6 +++--- .../patches/vfs_races-2.6-rhel5.patch | 23 ++++++++++------------ lustre/kernel_patches/series/2.6-rhel5.series | 3 --- lustre/kernel_patches/targets/2.6-rhel5.target.in | 2 +- lustre/kernel_patches/which_patch | 2 +- 10 files changed, 35 insertions(+), 54 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 9a0336a..3ff03e8 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -1,13 +1,17 @@ 2012-xx-xx Whamcloud, Inc. * version 1.8.8-wc1 * Support for kernels: - 2.6.18-274.3.1.el5 (RHEL 5) + 2.6.18-308.1.1.el5 (RHEL 5) 2.6.32-220.7.1.el6 (RHEL 6) - patchless client only * Recommended e2fsprogs version: 1.41.90.wc3 See http://wiki.whamcloud.com/display/PUB/Changelog+1.8 for more information. Severity : enhancement +Jira : LU-1052 +Description: Kernel update [RHEL5.8 2.6.18-308.1.1.el5] + +Severity : enhancement Jira : LU-1241 Description: Update RHEL6.2 kernel to 2.6.32-220.7.1. diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config index 757a773..0c8623f 100644 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config +++ b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.18-prep -# Thu Aug 11 21:10:01 2011 +# Sun Mar 18 11:07:00 2012 # CONFIG_X86_32=y CONFIG_GENERIC_TIME=y @@ -1231,9 +1231,6 @@ CONFIG_FCOE_FNIC=m # CONFIG_SCSI_FUTURE_DOMAIN is not set CONFIG_SCSI_GDTH=m CONFIG_SCSI_ISCI=m -# CONFIG_PBG_HBA_BETA is not set -CONFIG_PBG_HBA_A2=y -# CONFIG_PBG_HBA_A0 is not set CONFIG_SCSI_IPS=m CONFIG_SCSI_INITIO=m # CONFIG_SCSI_INIA100 is not set @@ -2651,6 +2648,7 @@ CONFIG_USB_STORAGE_ALAUDA=y # USB Input Devices # CONFIG_USB_HID=y +CONFIG_HIDRAW=y CONFIG_USB_HIDINPUT=y CONFIG_USB_HIDINPUT_POWERBOOK=y CONFIG_HID_FF=y diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config index c1dc325..af6128a 100644 --- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config +++ b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.18-prep -# Thu Aug 11 21:03:59 2011 +# Sun Mar 18 11:05:23 2012 # CONFIG_X86_64=y CONFIG_64BIT=y @@ -1170,9 +1170,6 @@ CONFIG_FCOE_FNIC=m # CONFIG_SCSI_FUTURE_DOMAIN is not set CONFIG_SCSI_GDTH=m CONFIG_SCSI_ISCI=m -# CONFIG_PBG_HBA_BETA is not set -CONFIG_PBG_HBA_A2=y -# CONFIG_PBG_HBA_A0 is not set CONFIG_SCSI_IPS=m CONFIG_SCSI_INITIO=m # CONFIG_SCSI_INIA100 is not set @@ -2554,6 +2551,7 @@ CONFIG_USB_STORAGE_ALAUDA=y # USB Input Devices # CONFIG_USB_HID=y +CONFIG_HIDRAW=y CONFIG_USB_HIDINPUT=y # CONFIG_USB_HIDINPUT_POWERBOOK is not set CONFIG_HID_FF=y diff --git a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch index 7779500..ad81124 100644 --- a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch +++ b/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch @@ -82,7 +82,7 @@ Index: linux-2.6.18-164.6.1/fs/jbd/commit.c /* is it possible for another commit to fail at roughly * the same time as this one? If so, we don't want to * trust the barrier flag in the super, but instead want -@@ -164,15 +182,74 @@ static int journal_write_commit_record(j +@@ -164,15 +182,76 @@ static int journal_write_commit_record(j spin_unlock(&journal->j_state_lock); /* And try again, without the barrier */ @@ -137,16 +137,18 @@ Index: linux-2.6.18-164.6.1/fs/jbd/commit.c + if (buffer_locked(bh)) { + spin_unlock(&journal->j_list_lock); + wait_on_buffer(bh); -+ if (unlikely(!buffer_uptodate(bh))) -+ ret = -EIO; + spin_lock(&journal->j_list_lock); + } ++ if (unlikely(!buffer_uptodate(bh))) ++ ret = -EIO; + if (!inverted_lock(journal, bh)) { + put_bh(bh); + spin_lock(&journal->j_list_lock); + continue; + } -+ if (buffer_jbd(bh) && jh->b_jlist == BJ_Locked) { ++ if (buffer_jbd(bh) && bh2jh(bh) == jh && ++ jh->b_transaction == commit_transaction && ++ jh->b_jlist == BJ_Locked) { + __journal_unfile_buffer(jh); + jbd_unlock_bh_state(bh); + journal_remove_journal_head(bh); @@ -154,7 +156,7 @@ Index: linux-2.6.18-164.6.1/fs/jbd/commit.c + } else { + jbd_unlock_bh_state(bh); + } -+ put_bh(bh); ++ release_data_buffer(bh); + cond_resched_lock(&journal->j_list_lock); + } + return ret; @@ -191,7 +193,7 @@ Index: linux-2.6.18-164.6.1/fs/jbd/commit.c /* * First job: lock down the current transaction and wait for -@@ -444,39 +537,14 @@ void journal_commit_transaction(journal_ +@@ -446,41 +537,14 @@ void journal_commit_transaction(journal_ err = journal_submit_data_buffers(journal, commit_transaction); /* @@ -219,7 +221,9 @@ Index: linux-2.6.18-164.6.1/fs/jbd/commit.c - spin_lock(&journal->j_list_lock); - continue; - } -- if (buffer_jbd(bh) && jh->b_jlist == BJ_Locked) { +- if (buffer_jbd(bh) && bh2jh(bh) == jh && +- jh->b_transaction == commit_transaction && +- jh->b_jlist == BJ_Locked) { - __journal_unfile_buffer(jh); - jbd_unlock_bh_state(bh); - journal_remove_journal_head(bh); diff --git a/lustre/kernel_patches/patches/md-avoid-bug_on-when-bmc-overflow.patch b/lustre/kernel_patches/patches/md-avoid-bug_on-when-bmc-overflow.patch index f64557e..bbb86e73 100644 --- a/lustre/kernel_patches/patches/md-avoid-bug_on-when-bmc-overflow.patch +++ b/lustre/kernel_patches/patches/md-avoid-bug_on-when-bmc-overflow.patch @@ -24,15 +24,6 @@ diff .prev/drivers/md/bitmap.c ./drivers/md/bitmap.c switch(*bmc) { case 0: bitmap_file_set_bit(bitmap, offset); -@@ -1169,7 +1185,7 @@ int bitmap_startwrite(struct bitmap *bit - case 1: - *bmc = 2; - } -- BUG_ON((*bmc & COUNTER_MAX) == COUNTER_MAX); -+ - (*bmc)++; - - spin_unlock_irq(&bitmap->lock); @@ -1207,6 +1223,9 @@ void bitmap_endwrite(struct bitmap *bitm if (!success && ! (*bmc & NEEDED_MASK)) *bmc |= NEEDED_MASK; @@ -43,14 +34,6 @@ diff .prev/drivers/md/bitmap.c ./drivers/md/bitmap.c (*bmc)--; if (*bmc <= 2) { set_page_attr(bitmap, -@@ -1431,6 +1450,7 @@ int bitmap_create(mddev_t *mddev) - spin_lock_init(&bitmap->lock); - atomic_set(&bitmap->pending_writes, 0); - init_waitqueue_head(&bitmap->write_wait); -+ init_waitqueue_head(&bitmap->overflow_wait); - - bitmap->mddev = mddev; - diff .prev/include/linux/raid/bitmap.h ./include/linux/raid/bitmap.h --- .prev/include/linux/raid/bitmap.h 2007-02-07 13:03:56.000000000 +1100 +++ ./include/linux/raid/bitmap.h 2007-02-07 20:57:57.000000000 +1100 diff --git a/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch b/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch index 4fd66a6..7c95d56 100644 --- a/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch +++ b/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch @@ -425,9 +425,9 @@ Index: linux-2.6.18-128.1.14/mm/filemap.c #include #include "internal.h" @@ -567,11 +568,55 @@ - if (!test_clear_page_writeback(page)) - BUG(); - } + if (!test_clear_page_writeback(page)) + BUG(); + + clear_page_constant(page); smp_mb__after_clear_bit(); wake_up_page(page, PG_writeback); diff --git a/lustre/kernel_patches/patches/vfs_races-2.6-rhel5.patch b/lustre/kernel_patches/patches/vfs_races-2.6-rhel5.patch index cf16167..623ecf5 100644 --- a/lustre/kernel_patches/patches/vfs_races-2.6-rhel5.patch +++ b/lustre/kernel_patches/patches/vfs_races-2.6-rhel5.patch @@ -23,13 +23,13 @@ diff -urp linux-2.6.18.rawops/fs/dcache.c linux-2.6.18.races/fs/dcache.c +void d_rehash_cond(struct dentry * entry, int lock) { - spin_lock(&dcache_lock); -+ if (lock) ++ if (lock) + spin_lock(&dcache_lock); spin_lock(&entry->d_lock); _d_rehash(entry); spin_unlock(&entry->d_lock); - spin_unlock(&dcache_lock); -+ if (lock) ++ if (lock) + spin_unlock(&dcache_lock); +} +EXPORT_SYMBOL(d_rehash_cond); @@ -40,20 +40,17 @@ diff -urp linux-2.6.18.rawops/fs/dcache.c linux-2.6.18.races/fs/dcache.c } #define do_switch(x,y) do { \ -@@ -1481,7 +1496,7 @@ static void switch_names(struct dentry * - * Update the dcache to reflect the move of a file name. Negative - * dcache entries should not be moved in this way. - */ --static void d_move_locked(struct dentry * dentry, struct dentry * target) -+void d_move_locked(struct dentry * dentry, struct dentry * target) - { - struct hlist_head *list; - -@@ -1549,6 +1563,8 @@ already_unhashed: +@@ -1481,6 +1496,14 @@ static void switch_names(struct dentry * + fsnotify_d_move(dentry); spin_unlock(&dentry->d_lock); - write_sequnlock(&rename_lock); } + ++void d_move_locked(struct dentry * dentry, struct dentry * target) ++{ ++ write_seqlock(&rename_lock); ++ __d_move(dentry, target); ++ write_sequnlock(&rename_lock); ++} +EXPORT_SYMBOL(d_move_locked); /** diff --git a/lustre/kernel_patches/series/2.6-rhel5.series b/lustre/kernel_patches/series/2.6-rhel5.series index 7445404..f81f552 100644 --- a/lustre/kernel_patches/series/2.6-rhel5.series +++ b/lustre/kernel_patches/series/2.6-rhel5.series @@ -17,7 +17,6 @@ raid5-stripe-by-stripe-handling-rhel5.patch raid5-merge-ios-rhel5.patch raid5-zerocopy-rhel5.patch raid5-maxsectors-rhel5.patch -raid5-rebuild-corrupt-bug.patch md-rebuild-policy.patch jbd-journal-chksum-2.6.18-vanilla.patch quota-large-limits-rhel5.patch @@ -25,5 +24,3 @@ md-mmp-unplug-dev.patch 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 -fix-forever-in-do_get_write_access.patch diff --git a/lustre/kernel_patches/targets/2.6-rhel5.target.in b/lustre/kernel_patches/targets/2.6-rhel5.target.in index af3fdaa..0b6ad3b 100644 --- a/lustre/kernel_patches/targets/2.6-rhel5.target.in +++ b/lustre/kernel_patches/targets/2.6-rhel5.target.in @@ -1,5 +1,5 @@ lnxmaj="2.6.18" -lnxrel="274.3.1.el5" +lnxrel="308.1.1.el5" KERNEL_SRPM=kernel-${lnxmaj}-${lnxrel}.src.rpm SERIES=2.6-rhel5.series diff --git a/lustre/kernel_patches/which_patch b/lustre/kernel_patches/which_patch index 01c9004..f5e59ad 100644 --- a/lustre/kernel_patches/which_patch +++ b/lustre/kernel_patches/which_patch @@ -1,7 +1,7 @@ SERIES VERSION COMMENT SUPPORTED KERNELS: -2.6-rhel5 RHEL5: 2.6.18-274.3.1.el5 +2.6-rhel5 RHEL5: 2.6.18-308.1.1.el5 CLIENT SUPPORT FOR UNPATCHED KERNELS: kernel.org 2.6.16-2.6.32 -- 1.8.3.1