From: Rahul Deshmukh Date: Thu, 19 Aug 2010 17:02:56 +0000 (+0400) Subject: b=23368 MMP: Watchdog detected LOCKUP on CPU 1 RIP: __list_add+0x6/0x68 X-Git-Tag: 2.0.51.0~28 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=3dabe77a496d1c9b375264da220a90683b219daa;hp=51edcc2d941f97b6ae7ac741ae250c76818d82bc b=23368 MMP: Watchdog detected LOCKUP on CPU 1 RIP: __list_add+0x6/0x68 b=23368 MMP: Watchdog detected LOCKUP on CPU 1 RIP: __list_add+0x6/0x68 i=sheng.yang Ported the ext4 patches for master (rhel5) disable delalloc,disable mb-cache and remove extents warning. --- diff --git a/ldiskfs/kernel_patches/patches/ext4-disable-delalloc-rhel5.patch b/ldiskfs/kernel_patches/patches/ext4-disable-delalloc-rhel5.patch new file mode 100644 index 0000000..8bbb947 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/ext4-disable-delalloc-rhel5.patch @@ -0,0 +1,20 @@ +Disable the DELALLOC feature because it is not robust in ext4 versions < 2.6.31. + +-- +diff -rupN linux-2.6.18-164.6.1_1/fs/ext4/super.c linux-2.6.18-164.6.1_2/fs/ext4/super.c +--- linux-2.6.18-164.6.1_1/fs/ext4/super.c 2010-08-05 13:44:07.000000000 +0530 ++++ linux-2.6.18-164.6.1_2/fs/ext4/super.c 2010-08-05 13:46:29.000000000 +0530 +@@ -2091,13 +2091,6 @@ static int ext4_fill_super(struct super_ + + set_opt(sbi->s_mount_opt, BARRIER); + +- /* +- * enable delayed allocation by default +- * Use -o nodelalloc to turn it off +- */ +- set_opt(sbi->s_mount_opt, DELALLOC); +- +- + if (!parse_options((char *) data, sb, &journal_devnum, + &journal_ioprio, NULL, 0)) + goto failed_mount; diff --git a/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel5.patch b/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel5.patch new file mode 100644 index 0000000..9229cd2 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-rhel5.patch @@ -0,0 +1,154 @@ +Index: linux-stage/fs/ext4/xattr.c +=================================================================== +--- linux-stage.orig/fs/ext4/xattr.c ++++ linux-stage/fs/ext4/xattr.c +@@ -86,7 +86,8 @@ + # define ea_bdebug(f...) + #endif + +-static void ext4_xattr_cache_insert(struct buffer_head *); ++static void ext4_xattr_cache_insert(struct super_block *, ++ struct buffer_head *); + static struct buffer_head *ext4_xattr_cache_find(struct inode *, + struct ext4_xattr_header *, + struct mb_cache_entry **); +@@ -233,7 +234,7 @@ bad_block: ext4_error(inode->i_sb, __fun + error = -EIO; + goto cleanup; + } +- ext4_xattr_cache_insert(bh); ++ ext4_xattr_cache_insert(inode->i_sb, bh); + entry = BFIRST(bh); + error = ext4_xattr_find_entry(&entry, name_index, name, bh->b_size, 1); + if (error == -EIO) +@@ -375,7 +376,7 @@ ext4_xattr_block_list(struct inode *inod + error = -EIO; + goto cleanup; + } +- ext4_xattr_cache_insert(bh); ++ ext4_xattr_cache_insert(inode->i_sb, bh); + error = ext4_xattr_list_entries(inode, BFIRST(bh), buffer, buffer_size); + + cleanup: +@@ -472,7 +473,9 @@ ext4_xattr_release_block(handle_t *handl + struct mb_cache_entry *ce = NULL; + int error = 0; + +- ce = mb_cache_entry_get(ext4_xattr_cache, bh->b_bdev, bh->b_blocknr); ++ if (!test_opt(inode->i_sb, NO_MBCACHE)) ++ ce = mb_cache_entry_get(ext4_xattr_cache, bh->b_bdev, ++ bh->b_blocknr); + error = ext4_journal_get_write_access(handle, bh); + if (error) + goto out; +@@ -700,8 +703,10 @@ ext4_xattr_block_set(handle_t *handle, s + if (i->value && i->value_len > sb->s_blocksize) + return -ENOSPC; + if (s->base) { +- ce = mb_cache_entry_get(ext4_xattr_cache, bs->bh->b_bdev, +- bs->bh->b_blocknr); ++ if (!test_opt(inode->i_sb, NO_MBCACHE)) ++ ce = mb_cache_entry_get(ext4_xattr_cache, ++ bs->bh->b_bdev, ++ bs->bh->b_blocknr); + error = ext4_journal_get_write_access(handle, bs->bh); + if (error) + goto cleanup; +@@ -718,7 +723,7 @@ ext4_xattr_block_set(handle_t *handle, s + if (!IS_LAST_ENTRY(s->first)) + ext4_xattr_rehash(header(s->base), + s->here); +- ext4_xattr_cache_insert(bs->bh); ++ ext4_xattr_cache_insert(sb, bs->bh); + } + unlock_buffer(bs->bh); + if (error == -EIO) +@@ -801,7 +806,8 @@ inserted: + if (error) + goto cleanup_dquot; + } +- mb_cache_entry_release(ce); ++ if (ce) ++ mb_cache_entry_release(ce); + ce = NULL; + } else if (bs->bh && s->base == bs->bh->b_data) { + /* We were modifying this block in-place. */ +@@ -845,7 +851,7 @@ getblk_failed: + memcpy(new_bh->b_data, s->base, new_bh->b_size); + set_buffer_uptodate(new_bh); + unlock_buffer(new_bh); +- ext4_xattr_cache_insert(new_bh); ++ ext4_xattr_cache_insert(sb, new_bh); + error = ext4_handle_dirty_metadata(handle, + inode, new_bh); + if (error) +@@ -1404,12 +1410,15 @@ ext4_xattr_put_super(struct super_block + * Returns 0, or a negative error number on failure. + */ + static void +-ext4_xattr_cache_insert(struct buffer_head *bh) ++ext4_xattr_cache_insert(struct super_block *sb, struct buffer_head *bh) + { + __u32 hash = le32_to_cpu(BHDR(bh)->h_hash); + struct mb_cache_entry *ce; + int error; + ++ if (test_opt(sb, NO_MBCACHE)) ++ return; ++ + ce = mb_cache_entry_alloc(ext4_xattr_cache); + if (!ce) { + ea_bdebug(bh, "out of memory"); +@@ -1483,6 +1492,8 @@ ext4_xattr_cache_find(struct inode *inod + __u32 hash = le32_to_cpu(header->h_hash); + struct mb_cache_entry *ce; + ++ if (test_opt(inode->i_sb, NO_MBCACHE)) ++ return NULL; + if (!header->h_hash) + return NULL; /* never share */ + ea_idebug(inode, "looking for cached blocks [%x]", (int)hash); +Index: linux-stage/fs/ext4/super.c +=================================================================== +--- linux-stage.orig/fs/ext4/super.c ++++ linux-stage/fs/ext4/super.c +@@ -1481,6 +1481,7 @@ enum { + Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, Opt_bigendian_extents, + Opt_force_over_16tb, + Opt_extents, Opt_noextents, ++ Opt_no_mbcache, + }; + + static match_table_t tokens = { +@@ -1554,6 +1555,7 @@ static match_table_t tokens = { + {Opt_force_over_16tb, "force_over_16tb"}, + {Opt_extents, "extents"}, + {Opt_noextents, "noextents"}, ++ {Opt_no_mbcache, "no_mbcache"}, + {Opt_err, NULL}, + }; + +@@ -2030,6 +2032,9 @@ set_qf_format: + } + clear_opt(sbi->s_mount_opt, EXTENTS); + break; ++ case Opt_no_mbcache: ++ set_opt(sbi->s_mount_opt, NO_MBCACHE); ++ break; + default: + ext4_msg(sb, KERN_ERR, + "Unrecognized mount option \"%s\" " +Index: linux-stage/fs/ext4/ext4.h +=================================================================== +--- linux-stage.orig/fs/ext4/ext4.h ++++ linux-stage/fs/ext4/ext4.h +@@ -715,7 +715,8 @@ struct ext4_inode_info { + /* + * Mount flags + */ +-#define EXT4_MOUNT_OLDALLOC 0x00002 /* Don't use the new Orlov allocator */ ++#define EXT4_MOUNT_NO_MBCACHE 0x00001 /* Disable mbcache */ ++#define EXT4_MOUNT_OLDALLOC 0x00002 /* Don't use the new Orlov allocator */ + #define EXT4_MOUNT_GRPID 0x00004 /* Create files with directory's group */ + #define EXT4_MOUNT_DEBUG 0x00008 /* Some debugging messages */ + #define EXT4_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */ diff --git a/ldiskfs/kernel_patches/patches/ext4-remove-extents-warning-rhel5.patch b/ldiskfs/kernel_patches/patches/ext4-remove-extents-warning-rhel5.patch new file mode 100644 index 0000000..0cd6255 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/ext4-remove-extents-warning-rhel5.patch @@ -0,0 +1,15 @@ +Index: linux-stage/fs/ext4/super.c +=================================================================== +--- linux-stage.orig/fs/ext4/super.c ++++ linux-stage/fs/ext4/super.c +@@ -2564,10 +2564,6 @@ static int ext4_fill_super(struct super_ + */ + if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) + set_opt(sbi->s_mount_opt, EXTENTS); +- else +- ext4_warning(sb, __func__, +- "extents feature not enabled on this filesystem, " +- "use tune2fs."); + + /* + * enable delayed allocation by default diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series index ecc6b6c..6655978 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5-ext4.series @@ -31,3 +31,6 @@ ext4-extents-mount-option-rhel5.patch ext4-fiemap-2.6-rhel5.patch ext4-mballoc-pa_free-mismatch.patch ext4_data_in_dirent.patch +ext4-disable-mb-cache-rhel5.patch +ext4-remove-extents-warning-rhel5.patch +ext4-disable-delalloc-rhel5.patch