From: girish Date: Thu, 4 Jun 2009 11:56:13 +0000 (+0000) Subject: b=19686 X-Git-Tag: v1_9_0_200~8 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b1a9e5d2f2ebdb808cb40a4aa86bafd459873141;hp=8fa04e97a59178f3ed03056f7a8a318b0cc024c6 b=19686 i=adilger i=johann declare HAVE_DISK_INODE_VERSION for sles11 and use bh properly --- diff --git a/ldiskfs/kernel_patches/patches/ext4-misc-sles11.patch b/ldiskfs/kernel_patches/patches/ext4-misc-sles11.patch index 333bf01..9899574 100644 --- a/ldiskfs/kernel_patches/patches/ext4-misc-sles11.patch +++ b/ldiskfs/kernel_patches/patches/ext4-misc-sles11.patch @@ -1,7 +1,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ext4_jbd2.h =================================================================== ---- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_jbd2.h -+++ linux-2.6.27.21-0.1/fs/ext4/ext4_jbd2.h +--- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_jbd2.h 2009-06-02 18:39:19.000000000 +0530 ++++ linux-2.6.27.21-0.1/fs/ext4/ext4_jbd2.h 2009-06-04 17:01:43.000000000 +0530 @@ -35,6 +35,9 @@ (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \ || test_opt(sb, EXTENTS) ? 27U : 8U) @@ -14,8 +14,8 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ext4_jbd2.h * and the superblock, which are already accounted for. */ Index: linux-2.6.27.21-0.1/fs/ext4/extents.c =================================================================== ---- linux-2.6.27.21-0.1.orig/fs/ext4/extents.c -+++ linux-2.6.27.21-0.1/fs/ext4/extents.c +--- linux-2.6.27.21-0.1.orig/fs/ext4/extents.c 2009-06-04 17:01:43.000000000 +0530 ++++ linux-2.6.27.21-0.1/fs/ext4/extents.c 2009-06-04 17:01:48.000000000 +0530 @@ -48,7 +48,7 @@ * ext_pblock: * combine low and high parts of physical block number into ext4_fsblk_t @@ -25,7 +25,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/extents.c { ext4_fsblk_t block; -@@ -58,6 +58,17 @@ static ext4_fsblk_t ext_pblock(struct ex +@@ -58,6 +58,17 @@ } /* @@ -43,7 +43,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/extents.c * idx_pblock: * combine low and high parts of a leaf physical block number into ext4_fsblk_t */ -@@ -71,17 +82,6 @@ ext4_fsblk_t idx_pblock(struct ext4_exte +@@ -71,17 +82,6 @@ } /* @@ -61,7 +61,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/extents.c * ext4_idx_store_pblock: * stores a large physical block number into an index struct, * breaking it into parts -@@ -1851,6 +1851,56 @@ static int ext4_ext_rm_idx(handle_t *han +@@ -1851,6 +1851,56 @@ } /* @@ -118,7 +118,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/extents.c * ext4_ext_calc_credits_for_single_extent: * This routine returns max. credits that needed to insert an extent * to the extent tree. -@@ -3170,3 +3220,14 @@ int ext4_fiemap(struct inode *inode, str +@@ -3170,3 +3220,14 @@ return error; } @@ -135,8 +135,8 @@ Index: linux-2.6.27.21-0.1/fs/ext4/extents.c + Index: linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h =================================================================== ---- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_extents.h -+++ linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h +--- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_extents.h 2009-06-04 17:01:43.000000000 +0530 ++++ linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h 2009-06-04 17:01:48.000000000 +0530 @@ -59,6 +59,11 @@ */ #define EXT_STATS_ @@ -149,7 +149,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h /* * ext4_inode has i_block array (60 bytes total). -@@ -124,6 +129,7 @@ struct ext4_ext_path { +@@ -124,6 +129,7 @@ #define EXT4_EXT_CACHE_GAP 1 #define EXT4_EXT_CACHE_EXTENT 2 @@ -157,7 +157,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h #define EXT_MAX_BLOCK 0xffffffff -@@ -223,10 +229,14 @@ static inline int ext4_ext_get_actual_le +@@ -223,10 +229,14 @@ (le16_to_cpu(ext->ee_len) - EXT_INIT_MAX_LEN)); } @@ -174,9 +174,9 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h struct ext4_ext_path *path); Index: linux-2.6.27.21-0.1/fs/ext4/mballoc.c =================================================================== ---- linux-2.6.27.21-0.1.orig/fs/ext4/mballoc.c -+++ linux-2.6.27.21-0.1/fs/ext4/mballoc.c -@@ -4348,6 +4348,13 @@ repeat: +--- linux-2.6.27.21-0.1.orig/fs/ext4/mballoc.c 2009-06-04 17:01:43.000000000 +0530 ++++ linux-2.6.27.21-0.1/fs/ext4/mballoc.c 2009-06-04 17:01:43.000000000 +0530 +@@ -4354,6 +4354,13 @@ kmem_cache_free(ext4_ac_cachep, ac); } @@ -190,7 +190,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/mballoc.c /* * finds all preallocated spaces and return blocks being freed to them * if preallocated space becomes full (no block is used from the space) -@@ -5170,3 +5177,6 @@ error_return: +@@ -5176,3 +5183,6 @@ kmem_cache_free(ext4_ac_cachep, ac); return; } @@ -199,9 +199,9 @@ Index: linux-2.6.27.21-0.1/fs/ext4/mballoc.c + Index: linux-2.6.27.21-0.1/fs/ext4/super.c =================================================================== ---- linux-2.6.27.21-0.1.orig/fs/ext4/super.c -+++ linux-2.6.27.21-0.1/fs/ext4/super.c -@@ -91,6 +91,7 @@ ext4_fsblk_t ext4_inode_bitmap(struct su +--- linux-2.6.27.21-0.1.orig/fs/ext4/super.c 2009-06-04 17:01:43.000000000 +0530 ++++ linux-2.6.27.21-0.1/fs/ext4/super.c 2009-06-04 17:01:46.000000000 +0530 +@@ -91,6 +91,7 @@ (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ? (ext4_fsblk_t)le32_to_cpu(bg->bg_inode_bitmap_hi) << 32 : 0); } @@ -209,7 +209,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/super.c ext4_fsblk_t ext4_inode_table(struct super_block *sb, struct ext4_group_desc *bg) -@@ -1295,6 +1296,7 @@ enum { +@@ -1295,6 +1296,7 @@ Opt_stripe, Opt_delalloc, Opt_nodelalloc, Opt_inode_readahead_blks, Opt_bigendian_extents, Opt_iopen, Opt_noiopen, Opt_iopen_nopriv, @@ -217,7 +217,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/super.c }; static const match_table_t tokens = { -@@ -1356,6 +1358,7 @@ static const match_table_t tokens = { +@@ -1356,6 +1358,7 @@ {Opt_nodelalloc, "nodelalloc"}, {Opt_inode_readahead_blks, "inode_readahead_blks=%u"}, {Opt_bigendian_extents, "bigendian_extents"}, @@ -225,7 +225,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/super.c {Opt_err, NULL}, }; -@@ -1774,6 +1777,8 @@ set_qf_format: +@@ -1774,6 +1777,8 @@ case Opt_bigendian_extents: bigendian_extents = 1; break; @@ -234,7 +234,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/super.c default: printk(KERN_ERR "EXT4-fs: Unrecognized mount option \"%s\" " -@@ -4095,7 +4100,7 @@ static struct file_system_type ext4dev_f +@@ -4094,7 +4099,7 @@ .kill_sb = kill_block_super, .fs_flags = FS_REQUIRES_DEV, }; @@ -245,9 +245,9 @@ Index: linux-2.6.27.21-0.1/fs/ext4/super.c { Index: linux-2.6.27.21-0.1/fs/ext4/ext4_jbd2.c =================================================================== ---- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_jbd2.c -+++ linux-2.6.27.21-0.1/fs/ext4/ext4_jbd2.c -@@ -21,6 +21,7 @@ int __ext4_journal_get_write_access(cons +--- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_jbd2.c 2009-06-02 18:39:19.000000000 +0530 ++++ linux-2.6.27.21-0.1/fs/ext4/ext4_jbd2.c 2009-06-04 17:01:43.000000000 +0530 +@@ -21,6 +21,7 @@ ext4_journal_abort_handle(where, __func__, bh, handle, err); return err; } @@ -255,15 +255,15 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ext4_jbd2.c int __ext4_journal_forget(const char *where, handle_t *handle, struct buffer_head *bh) -@@ -57,3 +58,4 @@ int __ext4_journal_dirty_metadata(const +@@ -57,3 +58,4 @@ ext4_journal_abort_handle(where, __func__, bh, handle, err); return err; } +EXPORT_SYMBOL(__ext4_journal_dirty_metadata); Index: linux-2.6.27.21-0.1/fs/ext4/ext4.h =================================================================== ---- linux-2.6.27.21-0.1.orig/fs/ext4/ext4.h -+++ linux-2.6.27.21-0.1/fs/ext4/ext4.h +--- linux-2.6.27.21-0.1.orig/fs/ext4/ext4.h 2009-06-04 17:01:43.000000000 +0530 ++++ linux-2.6.27.21-0.1/fs/ext4/ext4.h 2009-06-04 17:02:07.000000000 +0530 @@ -26,6 +26,9 @@ * The fourth extended filesystem constants/structures */ @@ -274,7 +274,16 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ext4.h /* * Define EXT4FS_DEBUG to produce debug messages */ -@@ -1116,6 +1119,8 @@ extern void ext4_mb_update_group_info(st +@@ -400,6 +403,8 @@ + __le32 i_version_hi; /* high 32 bits for 64-bit version */ + }; + ++/* SLES11 kernel already has 64-bit inode->i_version field */ ++#define HAVE_DISK_INODE_VERSION + + #define EXT4_EPOCH_BITS 2 + #define EXT4_EPOCH_MASK ((1 << EXT4_EPOCH_BITS) - 1) +@@ -1115,6 +1120,8 @@ extern int ext4_mb_get_buddy_cache_lock(struct super_block *, ext4_group_t); extern void ext4_mb_put_buddy_cache_lock(struct super_block *, ext4_group_t, int); @@ -285,9 +294,9 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ext4.h struct buffer_head *bh, ext4_fsblk_t blocknr); Index: linux-2.6.27.21-0.1/fs/ext4/inode.c =================================================================== ---- linux-2.6.27.21-0.1.orig/fs/ext4/inode.c -+++ linux-2.6.27.21-0.1/fs/ext4/inode.c -@@ -4240,6 +4240,7 @@ bad_inode: +--- linux-2.6.27.21-0.1.orig/fs/ext4/inode.c 2009-06-04 17:01:43.000000000 +0530 ++++ linux-2.6.27.21-0.1/fs/ext4/inode.c 2009-06-04 17:01:43.000000000 +0530 +@@ -4240,6 +4240,7 @@ iget_failed(inode); return ERR_PTR(ret); } diff --git a/ldiskfs/kernel_patches/patches/ext4-wantedi-2.6-sles11.patch b/ldiskfs/kernel_patches/patches/ext4-wantedi-2.6-sles11.patch index 914ed9c..76c0c9a 100644 --- a/ldiskfs/kernel_patches/patches/ext4-wantedi-2.6-sles11.patch +++ b/ldiskfs/kernel_patches/patches/ext4-wantedi-2.6-sles11.patch @@ -1,8 +1,8 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ialloc.c =================================================================== ---- linux-2.6.27.21-0.1.orig/fs/ext4/ialloc.c -+++ linux-2.6.27.21-0.1/fs/ext4/ialloc.c -@@ -675,7 +675,8 @@ err_ret: +--- linux-2.6.27.21-0.1.orig/fs/ext4/ialloc.c 2009-06-02 18:39:22.000000000 +0530 ++++ linux-2.6.27.21-0.1/fs/ext4/ialloc.c 2009-06-04 17:01:26.000000000 +0530 +@@ -675,7 +675,8 @@ * For other inodes, search forward from the parent directory's block * group to find a free inode. */ @@ -12,7 +12,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ialloc.c { struct super_block *sb; struct buffer_head *inode_bitmap_bh = NULL; -@@ -706,6 +707,43 @@ struct inode *ext4_new_inode(handle_t *h +@@ -706,6 +707,48 @@ sbi = EXT4_SB(sb); es = sbi->s_es; @@ -49,6 +49,11 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ialloc.c + /* We've shortcircuited the allocation system successfully, + * now finish filling in the inode. + */ ++ BUFFER_TRACE(group_desc_bh, "get_write_access"); ++ err = ext4_journal_get_write_access(handle, group_desc_bh); ++ if (err) ++ goto fail; ++ + goto got; + } + @@ -58,9 +63,9 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ialloc.c goto got_group; Index: linux-2.6.27.21-0.1/fs/ext4/namei.c =================================================================== ---- linux-2.6.27.21-0.1.orig/fs/ext4/namei.c -+++ linux-2.6.27.21-0.1/fs/ext4/namei.c -@@ -104,6 +104,7 @@ struct dx_entry +--- linux-2.6.27.21-0.1.orig/fs/ext4/namei.c 2009-06-02 18:39:22.000000000 +0530 ++++ linux-2.6.27.21-0.1/fs/ext4/namei.c 2009-06-04 17:00:38.000000000 +0530 +@@ -104,6 +104,7 @@ __le32 block; }; @@ -68,7 +73,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/namei.c /* * dx_root_info is laid out so that if it should somehow get overlaid by a * dirent the two low bits of the hash version will be zero. Therefore, the -@@ -149,6 +150,14 @@ struct dx_map_entry +@@ -149,6 +150,14 @@ u16 size; }; @@ -83,7 +88,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/namei.c static inline ext4_lblk_t dx_get_block(struct dx_entry *entry); static void dx_set_block(struct dx_entry *entry, ext4_lblk_t value); static inline unsigned dx_get_hash(struct dx_entry *entry); -@@ -1716,6 +1725,20 @@ static int ext4_add_nondir(handle_t *han +@@ -1716,6 +1725,20 @@ return err; } @@ -104,7 +109,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/namei.c /* * By the time this is called, we already have created * the directory cache entry for the new file, but it -@@ -1741,7 +1764,7 @@ retry: +@@ -1741,7 +1764,7 @@ if (IS_DIRSYNC(dir)) handle->h_sync = 1; @@ -113,7 +118,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/namei.c err = PTR_ERR(inode); if (!IS_ERR(inode)) { inode->i_op = &ext4_file_inode_operations; -@@ -1775,7 +1798,7 @@ retry: +@@ -1775,7 +1798,7 @@ if (IS_DIRSYNC(dir)) handle->h_sync = 1; @@ -122,7 +127,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/namei.c err = PTR_ERR(inode); if (!IS_ERR(inode)) { init_special_inode(inode, inode->i_mode, rdev); -@@ -1811,7 +1834,7 @@ retry: +@@ -1811,7 +1834,7 @@ if (IS_DIRSYNC(dir)) handle->h_sync = 1; @@ -131,7 +136,7 @@ Index: linux-2.6.27.21-0.1/fs/ext4/namei.c err = PTR_ERR(inode); if (IS_ERR(inode)) goto out_stop; -@@ -2211,7 +2234,7 @@ retry: +@@ -2211,7 +2234,7 @@ if (IS_DIRSYNC(dir)) handle->h_sync = 1; @@ -142,9 +147,9 @@ Index: linux-2.6.27.21-0.1/fs/ext4/namei.c goto out_stop; Index: linux-2.6.27.21-0.1/fs/ext4/ext4.h =================================================================== ---- linux-2.6.27.21-0.1.orig/fs/ext4/ext4.h -+++ linux-2.6.27.21-0.1/fs/ext4/ext4.h -@@ -1032,7 +1032,8 @@ extern int ext4fs_dirhash(const char *na +--- linux-2.6.27.21-0.1.orig/fs/ext4/ext4.h 2009-06-02 18:39:22.000000000 +0530 ++++ linux-2.6.27.21-0.1/fs/ext4/ext4.h 2009-06-04 17:00:38.000000000 +0530 +@@ -1032,7 +1032,8 @@ dx_hash_info *hinfo); /* ialloc.c */ @@ -156,9 +161,9 @@ Index: linux-2.6.27.21-0.1/fs/ext4/ext4.h extern unsigned long ext4_count_free_inodes(struct super_block *); Index: linux-2.6.27.21-0.1/fs/ext4/migrate.c =================================================================== ---- linux-2.6.27.21-0.1.orig/fs/ext4/migrate.c -+++ linux-2.6.27.21-0.1/fs/ext4/migrate.c -@@ -484,7 +484,7 @@ int ext4_ext_migrate(struct inode *inode +--- linux-2.6.27.21-0.1.orig/fs/ext4/migrate.c 2009-06-02 18:39:22.000000000 +0530 ++++ linux-2.6.27.21-0.1/fs/ext4/migrate.c 2009-06-04 17:00:38.000000000 +0530 +@@ -484,7 +484,7 @@ } tmp_inode = ext4_new_inode(handle, inode->i_sb->s_root->d_inode,