[Pkg-lustre-svn-commit] updated: [2165d43] Renewed ldiskfs patchset.

Marco Nelles marco.nelles at credativ.de
Fri Aug 24 09:46:45 UTC 2012


The following commit has been merged in the master branch:
commit 2165d43b1416d91b526ef4a58b0fa13cf8180c6e
Author: Marco Nelles <marco.nelles at credativ.de>
Date:   Fri Aug 24 11:46:20 2012 +0200

    Renewed ldiskfs patchset.

diff --git a/debian/patches/detect-2.6.32-vanilla.patch b/debian/patches/detect-2.6.32-squeeze.patch
similarity index 95%
rename from debian/patches/detect-2.6.32-vanilla.patch
rename to debian/patches/detect-2.6.32-squeeze.patch
index 670021d..e1e24f2 100644
--- a/debian/patches/detect-2.6.32-vanilla.patch
+++ b/debian/patches/detect-2.6.32-squeeze.patch
@@ -24,7 +24,7 @@ index c02f15a..a3bc7fd 100644
 +		elif test x$SUSE_KERNEL = xyes; then
  			LDISKFS_SERIES="2.6-sles11.series"
 +		else
-+			LDISKFS_SERIES="2.6.32-vanilla.series"
++			LDISKFS_SERIES="2.6.32-squeeze.series"
  		fi
  		;;
  	*)
@@ -54,7 +54,7 @@ index c02f15a..a3bc7fd 100644
 +		elif test x$SUSE_KERNEL = xyes; then
  			LDISKFS_SERIES="2.6-sles11.series"
 +		else
-+			LDISKFS_SERIES="2.6.32-vanilla.series"
++			LDISKFS_SERIES="2.6.32-squeeze.series"
  		fi
  		;;
  	*)
diff --git a/debian/patches/ldiskfs-kernel-patchset.patch b/debian/patches/ldiskfs-kernel-patchset.patch
index 1659478..dd05980 100644
--- a/debian/patches/ldiskfs-kernel-patchset.patch
+++ b/debian/patches/ldiskfs-kernel-patchset.patch
@@ -1,14 +1,14 @@
-diff --git a/ldiskfs/kernel_patches/patches/export-ext4-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/export-ext4-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/export-ext4-2.6-squeeze.patch b/ldiskfs/kernel_patches/patches/export-ext4-2.6-squeeze.patch
 new file mode 100644
-index 0000000..79a0e7f
+index 0000000..9341e64
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/export-ext4-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/export-ext4-2.6-squeeze.patch
 @@ -0,0 +1,81 @@
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-06-28 12:09:14.205662995 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-06-28 12:09:19.413668742 +0200
-+@@ -292,6 +292,8 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-23 14:51:38.290240225 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-23 14:51:42.860183093 +0200
++@@ -291,6 +291,8 @@
 + 	jbd2_journal_abort_handle(handle);
 + }
 + 
@@ -17,7 +17,7 @@ index 0000000..79a0e7f
 + /* Deal with the reporting of failure conditions on a filesystem such as
 +  * inconsistencies detected or read IO failures.
 +  *
-+@@ -3001,6 +3003,8 @@
++@@ -2971,6 +2973,8 @@
 + 	return ret;
 + }
 + 
@@ -26,7 +26,7 @@ index 0000000..79a0e7f
 + /*
 +  * Setup any per-fs journal parameters now.  We'll do this both on
 +  * initial mount, once the journal has been initialised but before we've
-+@@ -4056,6 +4060,12 @@
++@@ -4028,6 +4032,12 @@
 + 			unsigned long *blocks, int *created, int create);
 + EXPORT_SYMBOL(ext4_map_inode_page);
 + 
@@ -39,11 +39,11 @@ index 0000000..79a0e7f
 + MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
 + MODULE_DESCRIPTION("Fourth Extended Filesystem");
 + MODULE_LICENSE("GPL");
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-06-28 12:08:38.193663076 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-06-28 12:09:19.417666703 +0200
-+@@ -1498,6 +1498,8 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-23 14:43:23.574425024 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-23 14:51:42.862183067 +0200
++@@ -1371,6 +1371,8 @@
 + 				       struct buffer_head *bh,
 + 				       ext4_group_t group,
 + 				       struct ext4_group_desc *desc);
@@ -52,10 +52,10 @@ index 0000000..79a0e7f
 + extern void mark_bitmap_end(int start_bit, int end_bit, char *bitmap);
 + 
 + /* mballoc.c */
-+Index: linux-source-2.6.32/fs/ext4/ialloc.c
++Index: linux-2.6-2.6.32/fs/ext4/ialloc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ialloc.c	2012-06-28 12:08:38.081662455 +0200
-++++ linux-source-2.6.32/fs/ext4/ialloc.c	2012-06-28 12:09:19.417666703 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/ialloc.c	2012-08-23 14:43:23.574425024 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ialloc.c	2012-08-23 14:51:42.865183031 +0200
 +@@ -98,7 +98,7 @@
 +  *
 +  * Return buffer_head of bitmap on success or NULL.
@@ -73,11 +73,11 @@ index 0000000..79a0e7f
 + 
 + /*
 +  * NOTE! When we get the inode, we're the only people
-+Index: linux-source-2.6.32/fs/ext4/balloc.c
++Index: linux-2.6-2.6.32/fs/ext4/balloc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/balloc.c	2012-06-28 12:08:37.973664862 +0200
-++++ linux-source-2.6.32/fs/ext4/balloc.c	2012-06-28 12:09:19.417666703 +0200
-+@@ -232,6 +232,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/balloc.c	2012-08-23 14:43:23.574425024 +0200
+++++ linux-2.6-2.6.32/fs/ext4/balloc.c	2012-08-23 14:51:42.868182994 +0200
++@@ -235,6 +235,7 @@
 + 		*bh = sbi->s_group_desc[group_desc];
 + 	return desc;
 + }
@@ -85,17 +85,17 @@ index 0000000..79a0e7f
 + 
 + static int ext4_valid_block_bitmap(struct super_block *sb,
 + 					struct ext4_group_desc *desc,
-diff --git a/ldiskfs/kernel_patches/patches/ext4-alloc-policy-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-alloc-policy-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-alloc-policy-2.6-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-alloc-policy-2.6-squeeze.patch
 new file mode 100644
-index 0000000..9a8b6f4
+index 0000000..6701d44
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-alloc-policy-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-alloc-policy-2.6-squeeze.patch
 @@ -0,0 +1,87 @@
-+Index: linux-source-2.6.32/fs/ext4/ialloc.c
++Index: linux-2.6-2.6.32/fs/ext4/ialloc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ialloc.c	2012-07-05 11:44:31.987209607 +0200
-++++ linux-source-2.6.32/fs/ext4/ialloc.c	2012-07-05 11:44:44.644216399 +0200
-+@@ -1086,6 +1086,36 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ialloc.c	2012-08-23 15:05:04.016167266 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ialloc.c	2012-08-23 15:35:14.877528382 +0200
++@@ -1092,6 +1092,36 @@
 + 	return ERR_PTR(err);
 + }
 + 
@@ -132,10 +132,10 @@ index 0000000..9a8b6f4
 + /* Verify that we are loading a valid orphan from disk */
 + struct inode *ext4_orphan_get(struct super_block *sb, unsigned long ino)
 + {
-+Index: linux-source-2.6.32/fs/ext4/namei.c
++Index: linux-2.6-2.6.32/fs/ext4/namei.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-07-05 11:44:33.958707562 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-07-05 11:44:44.644216399 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/namei.c	2012-08-23 15:08:32.871556214 +0200
+++++ linux-2.6-2.6.32/fs/ext4/namei.c	2012-08-23 15:35:14.880528346 +0200
 +@@ -155,6 +155,12 @@
 + 	u32		ldp_magic;
 + };
@@ -149,7 +149,7 @@ index 0000000..9a8b6f4
 + 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);
-+@@ -1802,8 +1808,14 @@
++@@ -1805,8 +1811,14 @@
 + 	if (dentry->d_fsdata != NULL) {
 + 		struct lvfs_dentry_params *param = dentry->d_fsdata;
 + 
@@ -166,11 +166,11 @@ index 0000000..9a8b6f4
 + 	}
 + 	return inum;
 + }
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:44:41.034717694 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:44:44.644216399 +0200
-+@@ -1602,6 +1602,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-23 15:31:05.179650036 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-23 15:35:14.903528057 +0200
++@@ -1454,6 +1454,7 @@
 + extern struct inode *ext4_new_inode(handle_t *, struct inode *, int,
 + 				    const struct qstr *qstr, __u32 goal);
 + extern void ext4_free_inode(handle_t *, struct inode *);
@@ -178,17 +178,17 @@ index 0000000..9a8b6f4
 + extern struct inode * ext4_orphan_get(struct super_block *, unsigned long);
 + extern unsigned long ext4_count_free_inodes(struct super_block *);
 + extern unsigned long ext4_count_dirs(struct super_block *);
-diff --git a/ldiskfs/kernel_patches/patches/ext4-back-dquot-to-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-back-dquot-to-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-back-dquot-to-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-back-dquot-to-squeeze.patch
 new file mode 100644
-index 0000000..160f26d
+index 0000000..2cc7a9a
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-back-dquot-to-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-back-dquot-to-squeeze.patch
 @@ -0,0 +1,54 @@
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-04 11:15:14.133374111 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-04 11:15:17.645376714 +0200
-+@@ -1055,9 +1055,47 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-24 10:27:04.531540877 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-24 10:27:29.326230850 +0200
++@@ -1000,9 +1000,47 @@
 + static ssize_t ext4_quota_write(struct super_block *sb, int type,
 + 				const char *data, size_t len, loff_t off);
 + 
@@ -238,17 +238,17 @@ index 0000000..160f26d
 + 	.alloc_space	= dquot_alloc_space,
 + 	.reserve_space	= dquot_reserve_space,
 + 	.claim_space	= dquot_claim_space,
-diff --git a/ldiskfs/kernel_patches/patches/ext4-big-endian-check-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-big-endian-check-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-big-endian-check-2.6-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-big-endian-check-2.6-squeeze.patch
 new file mode 100644
-index 0000000..697594e
+index 0000000..2815fb4
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-big-endian-check-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-big-endian-check-2.6-squeeze.patch
 @@ -0,0 +1,57 @@
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-04 11:11:15.553381198 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-04 11:11:22.225361770 +0200
-+@@ -74,6 +74,8 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-23 15:33:36.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-23 15:34:54.035788941 +0200
++@@ -72,6 +72,8 @@
 + static int ext4_freeze(struct super_block *sb);
 + 
 + 
@@ -257,34 +257,34 @@ index 0000000..697594e
 + ext4_fsblk_t ext4_block_bitmap(struct super_block *sb,
 + 			       struct ext4_group_desc *bg)
 + {
-+@@ -1145,7 +1147,7 @@
++@@ -1088,7 +1090,7 @@
 + 	Opt_stripe, Opt_delalloc, Opt_nodelalloc,
 + 	Opt_block_validity, Opt_noblock_validity,
 + 	Opt_inode_readahead_blks, Opt_journal_ioprio,
-+-	Opt_mballoc,
-++	Opt_mballoc, Opt_bigendian_extents,
-+ 	Opt_discard, Opt_nodiscard,
-+ 	Opt_init_inode_table, Opt_noinit_inode_table,
++-	Opt_mballoc
+++	Opt_mballoc, Opt_bigendian_extents
 + };
-+@@ -1216,6 +1218,7 @@
++ 
++ static const match_table_t tokens = {
++@@ -1156,6 +1158,7 @@
 + 	{Opt_auto_da_alloc, "auto_da_alloc=%u"},
 + 	{Opt_auto_da_alloc, "auto_da_alloc"},
 + 	{Opt_noauto_da_alloc, "noauto_da_alloc"},
 ++	{Opt_bigendian_extents, "bigendian_extents"},
 + 	{Opt_mballoc, "mballoc"},
-+ 	{Opt_discard, "discard"},
-+ 	{Opt_nodiscard, "nodiscard"},
-+@@ -1651,6 +1654,9 @@
-+ 			else
-+ 				set_opt(sbi->s_mount_opt,NO_AUTO_DA_ALLOC);
++ 	{Opt_err, NULL},
++ };
++@@ -1584,6 +1587,9 @@
++ 			break;
++ 		case Opt_mballoc:
 + 			break;
 ++		case Opt_bigendian_extents:
 ++			bigendian_extents = 1;
 ++			break;
-+ 		case Opt_discard:
-+ 			set_opt(sbi->s_mount_opt, DISCARD);
-+ 			break;
-+@@ -2732,6 +2738,16 @@
++ 		default:
++ 			ext4_msg(sb, KERN_ERR,
++ 			       "Unrecognized mount option \"%s\" "
++@@ -2658,6 +2664,16 @@
 + 		goto failed_mount;
 + 	}
 + 
@@ -301,17 +301,17 @@ index 0000000..697594e
 + #ifdef CONFIG_PROC_FS
 + 	if (ext4_proc_root)
 + 		sbi->s_proc = proc_mkdir(sb->s_id, ext4_proc_root);
-diff --git a/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-squeeze.patch
 new file mode 100644
-index 0000000..8046e8b
+index 0000000..73e094a
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-2.6.32-vanilla.patch
-@@ -0,0 +1,154 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++++ b/ldiskfs/kernel_patches/patches/ext4-disable-mb-cache-squeeze.patch
+@@ -0,0 +1,156 @@
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:45:13.167310617 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:45:14.900200850 +0200
-+@@ -828,7 +828,8 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-24 10:24:02.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-24 10:27:04.526540941 +0200
++@@ -732,7 +732,8 @@
 + /*
 +  * Mount flags
 +  */
@@ -321,27 +321,29 @@ index 0000000..8046e8b
 + #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 */
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-05 11:44:57.595319239 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-05 11:45:14.904210309 +0200
-+@@ -1156,6 +1156,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-24 10:26:31.652951917 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-24 10:27:04.531540877 +0200
++@@ -1098,7 +1098,8 @@
++ 	Opt_block_validity, Opt_noblock_validity,
 + 	Opt_inode_readahead_blks, Opt_journal_ioprio,
 + 	Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb,
-+ 	Opt_extents, Opt_noextents,
-++	Opt_no_mbcache,
-+ 	Opt_discard, Opt_nodiscard,
-+ 	Opt_init_inode_table, Opt_noinit_inode_table,
++-	Opt_extents, Opt_noextents
+++	Opt_extents, Opt_noextents,
+++	Opt_no_mbcache
 + };
-+@@ -1229,6 +1230,7 @@
++ 
++ static const match_table_t tokens = {
++@@ -1169,6 +1170,7 @@
 + 	{Opt_bigendian_extents, "bigendian_extents"},
 + 	{Opt_force_over_128tb, "force_over_128tb"},
 + 	{Opt_mballoc, "mballoc"},
 ++	{Opt_no_mbcache, "no_mbcache"},
 + 	{Opt_extents, "extents"},
 + 	{Opt_noextents, "noextents"},
-+ 	{Opt_discard, "discard"},
-+@@ -1706,6 +1708,9 @@
++ 	{Opt_err, NULL},
++@@ -1631,6 +1633,9 @@
 + 			}
 + 			clear_opt(sbi->s_mount_opt, EXTENTS);
 + 			break;
@@ -351,10 +353,10 @@ index 0000000..8046e8b
 + 		default:
 + 			ext4_msg(sb, KERN_ERR,
 + 			       "Unrecognized mount option \"%s\" "
-+Index: linux-source-2.6.32/fs/ext4/xattr.c
++Index: linux-2.6-2.6.32/fs/ext4/xattr.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/xattr.c	2012-07-05 11:45:13.167310617 +0200
-++++ linux-source-2.6.32/fs/ext4/xattr.c	2012-07-05 11:45:14.904210309 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/xattr.c	2012-08-24 10:24:02.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/xattr.c	2012-08-24 10:27:04.535540828 +0200
 +@@ -86,7 +86,8 @@
 + # define ea_bdebug(f...)
 + #endif
@@ -435,7 +437,7 @@ index 0000000..8046e8b
 + 			error = ext4_handle_dirty_metadata(handle,
 + 							   inode, new_bh);
 + 			if (error)
-+@@ -1754,12 +1760,15 @@
++@@ -1751,12 +1757,15 @@
 +  * Returns 0, or a negative error number on failure.
 +  */
 + static void
@@ -452,7 +454,7 @@ index 0000000..8046e8b
 + 	ce = mb_cache_entry_alloc(ext4_xattr_cache, GFP_NOFS);
 + 	if (!ce) {
 + 		ea_bdebug(bh, "out of memory");
-+@@ -1832,6 +1841,8 @@
++@@ -1829,6 +1838,8 @@
 + 	__u32 hash = le32_to_cpu(header->h_hash);
 + 	struct mb_cache_entry *ce;
 + 
@@ -461,16 +463,16 @@ index 0000000..8046e8b
 + 	if (!header->h_hash)
 + 		return NULL;  /* never share */
 + 	ea_idebug(inode, "looking for cached blocks [%x]", (int)hash);
-diff --git a/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-squeeze.patch
 new file mode 100644
-index 0000000..cec1759
+index 0000000..7d13d2e
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-2.6.32-vanilla.patch
-@@ -0,0 +1,355 @@
-+Index: linux-source-2.6.32/fs/ext4/dynlocks.c
++++ b/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-squeeze.patch
+@@ -0,0 +1,350 @@
++Index: linux-2.6-2.6.32/fs/ext4/dynlocks.c
 +===================================================================
 +--- /dev/null	1970-01-01 00:00:00.000000000 +0000
-++++ linux-source-2.6.32/fs/ext4/dynlocks.c	2012-07-05 12:59:58.978707058 +0200
+++++ linux-2.6-2.6.32/fs/ext4/dynlocks.c	2012-08-24 09:50:41.679830226 +0200
 +@@ -0,0 +1,236 @@
 ++/*
 ++ * Dynamic Locks
@@ -708,10 +710,10 @@ index 0000000..cec1759
 ++	return result;
 ++}
 ++EXPORT_SYMBOL(dynlock_is_locked);
-+Index: linux-source-2.6.32/include/linux/dynlocks.h
++Index: linux-2.6-2.6.32/include/linux/dynlocks.h
 +===================================================================
 +--- /dev/null	1970-01-01 00:00:00.000000000 +0000
-++++ linux-source-2.6.32/include/linux/dynlocks.h	2012-07-05 12:59:58.978707058 +0200
+++++ linux-2.6-2.6.32/include/linux/dynlocks.h	2012-08-24 09:50:41.680830214 +0200
 +@@ -0,0 +1,34 @@
 ++#ifndef _LINUX_DYNLOCKS_H
 ++#define _LINUX_DYNLOCKS_H
@@ -747,10 +749,10 @@ index 0000000..cec1759
 ++
 ++#endif
 ++
-+Index: linux-source-2.6.32/fs/ext4/Makefile
++Index: linux-2.6-2.6.32/fs/ext4/Makefile
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/Makefile	2012-07-05 12:53:35.000000000 +0200
-++++ linux-source-2.6.32/fs/ext4/Makefile	2012-07-05 12:59:58.978707058 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/Makefile	2012-08-24 09:50:36.946889448 +0200
+++++ linux-2.6-2.6.32/fs/ext4/Makefile	2012-08-24 09:50:41.680830214 +0200
 +@@ -7,7 +7,7 @@
 + ext4-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
 + 		ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \
@@ -760,20 +762,17 @@ index 0000000..cec1759
 + 
 + ext4-$(CONFIG_EXT4_FS_XATTR)		+= xattr.o xattr_user.o xattr_trusted.o
 + ext4-$(CONFIG_EXT4_FS_POSIX_ACL)	+= acl.o
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-05 12:53:42.000000000 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-05 12:59:58.978707058 +0200
-+@@ -4131,20 +4131,23 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-24 09:50:36.948889424 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-24 09:50:41.684830165 +0200
++@@ -4054,32 +4054,37 @@
 + 		return err;
 + 	ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj);
 + 	if (!ext4_kset)
 +-		goto out4;
 ++		goto out5;
 + 	ext4_proc_root = proc_mkdir("fs/ext4", NULL);
-+ 
-+ 	err = ext4_init_feat_adverts();
-+ 
 + 	err = init_ext4_mballoc();
 + 	if (err)
 +-		goto out3;
@@ -791,8 +790,7 @@ index 0000000..cec1759
 + 		goto out1;
 + 	err = register_filesystem(&ext4_fs_type);
 + 	if (err)
-+@@ -4154,16 +4157,18 @@
-+ 	mutex_init(&ext4_li_mtx);
++ 		goto out;
 + 	return 0;
 + out:
 +-	destroy_inodecache();
@@ -806,7 +804,6 @@ index 0000000..cec1759
 + out3:
 ++	exit_ext4_mballoc();
 ++out4:
-+ 	ext4_exit_feat_adverts();
 + 	remove_proc_entry("fs/ext4", NULL);
 + 	kset_unregister(ext4_kset);
 +-out4:
@@ -814,7 +811,7 @@ index 0000000..cec1759
 + 	exit_ext4_system_zone();
 + 	return err;
 + }
-+@@ -4171,6 +4176,7 @@
++@@ -4087,6 +4092,7 @@
 + static void __exit exit_ext4_fs(void)
 + {
 + 	unregister_filesystem(&ext4_fs_type);
@@ -822,17 +819,17 @@ index 0000000..cec1759
 + 	destroy_inodecache();
 + 	exit_ext4_xattr();
 + 	exit_ext4_mballoc();
-diff --git a/ldiskfs/kernel_patches/patches/ext4-export-64bit-name-hash-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-export-64bit-name-hash-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-export-64bit-name-hash-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-export-64bit-name-hash-squeeze.patch
 new file mode 100644
-index 0000000..f2b1484
+index 0000000..31159b2
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-export-64bit-name-hash-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-export-64bit-name-hash-squeeze.patch
 @@ -0,0 +1,134 @@
-+Index: linux-source-2.6.32/fs/ext4/dir.c
++Index: linux-2.6-2.6.32/fs/ext4/dir.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/dir.c	2012-07-05 11:45:11.140204588 +0200
-++++ linux-source-2.6.32/fs/ext4/dir.c	2012-07-05 11:45:18.746714659 +0200
-+@@ -246,22 +246,50 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/dir.c	2012-08-24 10:23:40.788088021 +0200
+++++ linux-2.6-2.6.32/fs/ext4/dir.c	2012-08-24 10:28:35.001409796 +0200
++@@ -244,22 +244,50 @@
 + 	return ret;
 + }
 + 
@@ -894,7 +891,7 @@ index 0000000..f2b1484
 + 
 + /*
 +  * This structure holds the nodes of the red-black tree used to store
-+@@ -322,15 +350,16 @@
++@@ -320,15 +348,16 @@
 + }
 + 
 + 
@@ -914,7 +911,7 @@ index 0000000..f2b1484
 + 	return p;
 + }
 + 
-+@@ -426,7 +455,7 @@
++@@ -424,7 +453,7 @@
 + 		       "null fname?!?\n");
 + 		return 0;
 + 	}
@@ -923,7 +920,7 @@ index 0000000..f2b1484
 + 	while (fname) {
 + 		error = filldir(dirent, fname->name,
 + 				fname->name_len, curr_pos,
-+@@ -451,7 +480,7 @@
++@@ -449,7 +478,7 @@
 + 	int	ret;
 + 
 + 	if (!info) {
@@ -932,7 +929,7 @@ index 0000000..f2b1484
 + 		if (!info)
 + 			return -ENOMEM;
 + 		filp->private_data = info;
-+@@ -465,8 +494,8 @@
++@@ -463,8 +492,8 @@
 + 		free_rb_tree_fname(&info->root);
 + 		info->curr_node = NULL;
 + 		info->extra_fname = NULL;
@@ -943,11 +940,11 @@ index 0000000..f2b1484
 + 	}
 + 
 + 	/*
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:45:14.900200850 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:45:18.746714659 +0200
-+@@ -809,6 +809,14 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-24 10:27:04.526540941 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-24 10:28:35.004409760 +0200
++@@ -713,6 +713,14 @@
 + 	__u64 i_fs_version;
 + };
 + 
@@ -962,16 +959,16 @@ index 0000000..f2b1484
 + #define HAVE_DISK_INODE_VERSION
 + 
 + /*
-diff --git a/ldiskfs/kernel_patches/patches/ext4-ext_generation-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-ext_generation-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-ext_generation-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-ext_generation-squeeze.patch
 new file mode 100644
-index 0000000..fc65734
+index 0000000..065740c
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-ext_generation-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-ext_generation-squeeze.patch
 @@ -0,0 +1,48 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4_extents.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4_extents.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4_extents.h	2012-06-28 12:08:35.493670779 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4_extents.h	2012-06-28 12:09:30.485668675 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4_extents.h	2012-08-23 14:43:23.009432087 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4_extents.h	2012-08-23 14:51:57.062005546 +0200
 +@@ -194,6 +194,11 @@
 + 	return le16_to_cpu(ext_inode_hdr(inode)->eh_depth);
 + }
@@ -984,11 +981,11 @@ index 0000000..fc65734
 + static inline void
 + ext4_ext_invalidate_cache(struct inode *inode)
 + {
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-06-28 12:09:19.417666703 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-06-28 12:09:30.485668675 +0200
-+@@ -756,6 +756,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-23 14:51:42.862183067 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-23 14:51:57.064005522 +0200
++@@ -674,6 +674,7 @@
 + 	struct inode vfs_inode;
 + 	struct jbd2_inode jinode;
 + 
@@ -996,11 +993,11 @@ index 0000000..fc65734
 + 	struct ext4_ext_cache i_cached_extent;
 + 	/*
 + 	 * File creation time. Its function is same as that of
-+Index: linux-source-2.6.32/fs/ext4/extents.c
++Index: linux-2.6-2.6.32/fs/ext4/extents.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/extents.c	2012-06-28 12:08:35.401666340 +0200
-++++ linux-source-2.6.32/fs/ext4/extents.c	2012-06-28 12:09:30.489673456 +0200
-+@@ -1752,6 +1752,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/extents.c	2012-08-23 14:43:23.009432087 +0200
+++++ linux-2.6-2.6.32/fs/ext4/extents.c	2012-08-23 14:51:57.071005433 +0200
++@@ -1740,6 +1740,7 @@
 + 		ext4_ext_drop_refs(npath);
 + 		kfree(npath);
 + 	}
@@ -1008,25 +1005,25 @@ index 0000000..fc65734
 + 	ext4_ext_invalidate_cache(inode);
 + 	return err;
 + }
-+@@ -2380,6 +2381,7 @@
++@@ -2363,6 +2364,7 @@
 + 		}
 + 	}
 + out:
 ++	ext4_ext_tree_changed(inode);
 + 	ext4_ext_drop_refs(path);
 + 	kfree(path);
-+ 	if (err == -EAGAIN)
-diff --git a/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-2.6.32-vanilla.patch
++ 	ext4_journal_stop(handle);
+diff --git a/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-squeeze.patch
 new file mode 100644
-index 0000000..ddbe425
+index 0000000..8a602e4
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-2.6.32-vanilla.patch
-@@ -0,0 +1,168 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++++ b/ldiskfs/kernel_patches/patches/ext4-extents-mount-option-squeeze.patch
+@@ -0,0 +1,170 @@
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:44:51.610705754 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:45:04.162699334 +0200
-+@@ -850,6 +850,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-24 09:04:04.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-24 10:13:24.697790210 +0200
++@@ -754,6 +754,7 @@
 + #define EXT4_MOUNT_QUOTA		0x80000 /* Some quota option set */
 + #define EXT4_MOUNT_USRQUOTA		0x100000 /* "old" user quota */
 + #define EXT4_MOUNT_GRPQUOTA		0x200000 /* "old" group quota */
@@ -1034,10 +1031,10 @@ index 0000000..ddbe425
 + #define EXT4_MOUNT_JOURNAL_CHECKSUM	0x800000 /* Journal checksums */
 + #define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT	0x1000000 /* Journal Async Commit */
 + #define EXT4_MOUNT_I_VERSION            0x2000000 /* i_version support */
-+Index: linux-source-2.6.32/fs/ext4/ext4_jbd2.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4_jbd2.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4_jbd2.h	2012-07-05 11:44:41.038820625 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4_jbd2.h	2012-07-05 11:44:57.591213326 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4_jbd2.h	2012-08-23 15:31:05.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4_jbd2.h	2012-08-24 10:13:24.698790198 +0200
 +@@ -33,7 +33,7 @@
 + 
 + #define EXT4_SINGLEDATA_TRANS_BLOCKS(sb)				\
@@ -1047,11 +1044,11 @@ index 0000000..ddbe425
 + 
 + #define ext4_journal_dirty_metadata(handle, bh)  \
 + 		ext4_handle_dirty_metadata(handle, NULL, bh)
-+Index: linux-source-2.6.32/fs/ext4/extents.c
++Index: linux-2.6-2.6.32/fs/ext4/extents.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/extents.c	2012-07-05 11:44:41.038820625 +0200
-++++ linux-source-2.6.32/fs/ext4/extents.c	2012-07-05 11:44:57.595319239 +0200
-+@@ -2449,7 +2449,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/extents.c	2012-08-23 15:31:05.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/extents.c	2012-08-24 10:13:24.700790172 +0200
++@@ -2430,7 +2430,7 @@
 + 	 * possible initialization would be here
 + 	 */
 + 
@@ -1060,7 +1057,7 @@ index 0000000..ddbe425
 + #if defined(AGGRESSIVE_TEST) || defined(CHECK_BINSEARCH) || defined(EXTENTS_STATS)
 + 		printk(KERN_INFO "EXT4-fs: file extents enabled");
 + #ifdef AGGRESSIVE_TEST
-+@@ -2476,7 +2476,7 @@
++@@ -2457,7 +2457,7 @@
 +  */
 + void ext4_ext_release(struct super_block *sb)
 + {
@@ -1069,11 +1066,11 @@ index 0000000..ddbe425
 + 		return;
 + 
 + #ifdef EXTENTS_STATS
-+Index: linux-source-2.6.32/fs/ext4/ialloc.c
++Index: linux-2.6-2.6.32/fs/ext4/ialloc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ialloc.c	2012-07-05 11:44:44.644216399 +0200
-++++ linux-source-2.6.32/fs/ext4/ialloc.c	2012-07-05 11:44:57.595319239 +0200
-+@@ -1047,7 +1047,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ialloc.c	2012-08-23 15:35:14.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ialloc.c	2012-08-24 10:13:24.704790122 +0200
++@@ -1053,7 +1053,7 @@
 + 	if (err)
 + 		goto fail_free_drop;
 + 
@@ -1081,11 +1078,11 @@ index 0000000..ddbe425
 ++	if (test_opt(sb, EXTENTS)) {
 + 		/* set extent flag only for directory, file and normal symlink*/
 + 		if (S_ISDIR(mode) || S_ISREG(mode) || S_ISLNK(mode)) {
-+ 			ext4_set_inode_flag(inode, EXT4_INODE_EXTENTS);
-+Index: linux-source-2.6.32/fs/ext4/migrate.c
++ 			EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL;
++Index: linux-2.6-2.6.32/fs/ext4/migrate.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/migrate.c	2012-07-04 15:59:27.711713486 +0200
-++++ linux-source-2.6.32/fs/ext4/migrate.c	2012-07-05 11:44:57.595319239 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/migrate.c	2012-08-24 10:11:06.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/migrate.c	2012-08-24 10:13:24.706790098 +0200
 +@@ -459,13 +459,10 @@
 + 	unsigned long max_entries;
 + 	__u32 goal;
@@ -1096,7 +1093,7 @@ index 0000000..ddbe425
 +-	 */
 +-	if (!EXT4_HAS_INCOMPAT_FEATURE(inode->i_sb,
 +-				       EXT4_FEATURE_INCOMPAT_EXTENTS) ||
-+-	    (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)))
++-	    (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
 ++	if (!test_opt(inode->i_sb, EXTENTS))
 ++		/*
 ++		 * if mounted with noextents we don't allow the migrate
@@ -1104,12 +1101,12 @@ index 0000000..ddbe425
 + 		return -EINVAL;
 + 
 + 	if (S_ISLNK(inode->i_mode) && inode->i_blocks == 0)
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-05 11:44:53.591707738 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-05 11:44:57.595319239 +0200
-+@@ -933,6 +933,8 @@
-+ 		seq_puts(seq, ",journal_checksum");
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-24 10:13:23.159809437 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-24 10:13:24.712790022 +0200
++@@ -884,6 +884,8 @@
++ 		seq_puts(seq, ",journal_async_commit");
 + 	if (test_opt(sb, NOBH))
 + 		seq_puts(seq, ",nobh");
 ++	if (!test_opt(sb, EXTENTS))
@@ -1117,24 +1114,26 @@ index 0000000..ddbe425
 + 	if (test_opt(sb, I_VERSION))
 + 		seq_puts(seq, ",i_version");
 + 	if (!test_opt(sb, DELALLOC))
-+@@ -1153,6 +1155,7 @@
++@@ -1095,7 +1097,8 @@
++ 	Opt_stripe, Opt_delalloc, Opt_nodelalloc,
 + 	Opt_block_validity, Opt_noblock_validity,
 + 	Opt_inode_readahead_blks, Opt_journal_ioprio,
-+ 	Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb,
-++	Opt_extents, Opt_noextents,
-+ 	Opt_discard, Opt_nodiscard,
-+ 	Opt_init_inode_table, Opt_noinit_inode_table,
++-	Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb
+++	Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb,
+++	Opt_extents, Opt_noextents
 + };
-+@@ -1226,6 +1229,8 @@
++ 
++ static const match_table_t tokens = {
++@@ -1166,6 +1169,8 @@
 + 	{Opt_bigendian_extents, "bigendian_extents"},
 + 	{Opt_force_over_128tb, "force_over_128tb"},
 + 	{Opt_mballoc, "mballoc"},
 ++	{Opt_extents, "extents"},
 ++	{Opt_noextents, "noextents"},
-+ 	{Opt_discard, "discard"},
-+ 	{Opt_nodiscard, "nodiscard"},
 + 	{Opt_err, NULL},
-+@@ -1270,6 +1275,7 @@
++ };
++ 
++@@ -1208,6 +1213,7 @@
 + 	int qtype, qfmt;
 + 	char *qname;
 + #endif
@@ -1142,14 +1141,14 @@ index 0000000..ddbe425
 + 
 + 	if (!options)
 + 		return 1;
-+@@ -1674,6 +1680,32 @@
++@@ -1599,6 +1605,32 @@
 + 		case Opt_force_over_128tb:
 + 			force_over_128tb = 1;
 + 			break;
 ++		case Opt_extents:
 ++			if (!EXT4_HAS_INCOMPAT_FEATURE(sb,
 ++					EXT4_FEATURE_INCOMPAT_EXTENTS)) {
-++				ext4_warning(sb, __func__, "extents feature not enabled "
+++				ext4_warning(sb, "extents feature not enabled "
 ++						 "on this filesystem, use tune2fs");
 ++				return 0;
 ++			}
@@ -1175,7 +1174,7 @@ index 0000000..ddbe425
 + 		default:
 + 			ext4_msg(sb, KERN_ERR,
 + 			       "Unrecognized mount option \"%s\" "
-+@@ -2538,6 +2570,14 @@
++@@ -2464,6 +2496,14 @@
 + 	set_opt(sbi->s_mount_opt, BARRIER);
 + 
 + 	/*
@@ -1190,22 +1189,22 @@ index 0000000..ddbe425
 + 	 * enable delayed allocation by default
 + 	 * Use -o nodelalloc to turn it off
 + 	 */
-diff --git a/ldiskfs/kernel_patches/patches/ext4-fiemap-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-fiemap-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-fiemap-2.6-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-fiemap-2.6-squeeze.patch
 new file mode 100644
-index 0000000..dc186fe
+index 0000000..cf874a9
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-fiemap-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-fiemap-2.6-squeeze.patch
 @@ -0,0 +1,111 @@
 +This patch adds direct EXT4_IOC_FIEMAP support to ldiskfs, for Lustre to call
 +without having to go through do_vfs_ioctl() (which isn't exported, and has a
 +number of other ioctls which are not suitable for Lustre). The actual FIEMAP
 +support is already in the kernel/ext4 for normal usage.
 +
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:44:57.591213326 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:44:58.786714509 +0200
-+@@ -474,7 +474,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-24 10:13:24.697790210 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-24 10:14:31.549954442 +0200
++@@ -394,7 +394,7 @@
 + #define EXT4_IOC_GROUP_ADD		_IOW('f', 8, struct ext4_new_group_input)
 + #define EXT4_IOC_MIGRATE		_IO('f', 9)
 +  /* note ioctl 10 reserved for an early version of the FIEMAP ioctl */
@@ -1214,10 +1213,10 @@ index 0000000..dc186fe
 + #define EXT4_IOC_ALLOC_DA_BLKS		_IO('f', 12)
 + #define EXT4_IOC_MOVE_EXT		_IOWR('f', 15, struct move_extent)
 + 
-+Index: linux-source-2.6.32/fs/ext4/ioctl.c
++Index: linux-2.6-2.6.32/fs/ext4/ioctl.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ioctl.c	2012-07-04 15:59:27.539199985 +0200
-++++ linux-source-2.6.32/fs/ext4/ioctl.c	2012-07-05 11:44:58.794797520 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/ioctl.c	2012-08-23 14:43:19.468476356 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ioctl.c	2012-08-24 10:14:31.565954238 +0200
 +@@ -18,6 +18,71 @@
 + #include "ext4_jbd2.h"
 + #include "ext4.h"
@@ -1290,7 +1289,7 @@ index 0000000..dc186fe
 + long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 + {
 + 	struct inode *inode = filp->f_dentry->d_inode;
-+@@ -330,6 +395,9 @@
++@@ -313,6 +378,9 @@
 + 		mnt_drop_write(filp->f_path.mnt);
 + 		return err;
 + 	}
@@ -1300,52 +1299,52 @@ index 0000000..dc186fe
 + 
 + 	default:
 + 		return -ENOTTY;
-+Index: linux-source-2.6.32/fs/ext4/fiemap.h
++Index: linux-2.6-2.6.32/fs/ext4/fiemap.h
 +===================================================================
 +--- /dev/null	1970-01-01 00:00:00.000000000 +0000
-++++ linux-source-2.6.32/fs/ext4/fiemap.h	2012-07-05 11:44:58.794797520 +0200
+++++ linux-2.6-2.6.32/fs/ext4/fiemap.h	2012-08-24 10:14:31.588953949 +0200
 +@@ -0,0 +1,2 @@
 ++
 ++#include_next <fiemap.h>
-diff --git a/ldiskfs/kernel_patches/patches/ext4-force_over_128tb-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-force_over_128tb-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-force_over_128tb-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-force_over_128tb-squeeze.patch
 new file mode 100644
-index 0000000..1251150
+index 0000000..6a3f435
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-force_over_128tb-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-force_over_128tb-squeeze.patch
 @@ -0,0 +1,57 @@
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-04 11:11:22.225361770 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-04 11:11:32.573374989 +0200
-+@@ -57,6 +57,8 @@
-+ static struct ext4_lazy_init *ext4_li_info;
-+ static struct mutex ext4_li_mtx;
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-23 15:36:24.656656025 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-23 15:37:33.354797179 +0200
++@@ -55,6 +55,8 @@
++ struct proc_dir_entry *ext4_proc_root;
++ static struct kset *ext4_kset;
 + 
 ++static int force_over_128tb;
 ++
 + static int ext4_load_journal(struct super_block *, struct ext4_super_block *,
 + 			     unsigned long journal_devnum);
 + static int ext4_commit_super(struct super_block *sb, int sync);
-+@@ -1147,7 +1149,7 @@
++@@ -1090,7 +1092,7 @@
 + 	Opt_stripe, Opt_delalloc, Opt_nodelalloc,
 + 	Opt_block_validity, Opt_noblock_validity,
 + 	Opt_inode_readahead_blks, Opt_journal_ioprio,
-+-	Opt_mballoc, Opt_bigendian_extents,
-++	Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb,
-+ 	Opt_discard, Opt_nodiscard,
-+ 	Opt_init_inode_table, Opt_noinit_inode_table,
++-	Opt_mballoc, Opt_bigendian_extents
+++	Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb
 + };
-+@@ -1219,6 +1221,7 @@
++ 
++ static const match_table_t tokens = {
++@@ -1159,6 +1161,7 @@
 + 	{Opt_auto_da_alloc, "auto_da_alloc"},
 + 	{Opt_noauto_da_alloc, "noauto_da_alloc"},
 + 	{Opt_bigendian_extents, "bigendian_extents"},
 ++	{Opt_force_over_128tb, "force_over_128tb"},
 + 	{Opt_mballoc, "mballoc"},
-+ 	{Opt_discard, "discard"},
-+ 	{Opt_nodiscard, "nodiscard"},
-+@@ -1665,6 +1668,9 @@
-+ 			break;
-+ 		case Opt_mballoc:
++ 	{Opt_err, NULL},
++ };
++@@ -1590,6 +1593,9 @@
++ 		case Opt_bigendian_extents:
++ 			bigendian_extents = 1;
 + 			break;
 ++		case Opt_force_over_128tb:
 ++			force_over_128tb = 1;
@@ -1353,7 +1352,7 @@ index 0000000..1251150
 + 		default:
 + 			ext4_msg(sb, KERN_ERR,
 + 			       "Unrecognized mount option \"%s\" "
-+@@ -2690,6 +2696,16 @@
++@@ -2616,6 +2622,16 @@
 + 		goto failed_mount;
 + 	}
 + 
@@ -1370,18 +1369,18 @@ index 0000000..1251150
 + 	if (EXT4_BLOCKS_PER_GROUP(sb) == 0)
 + 		goto cantfind_ext4;
 + 
-diff --git a/ldiskfs/kernel_patches/patches/ext4-hash-indexed-dir-dotdot-update-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-hash-indexed-dir-dotdot-update-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-hash-indexed-dir-dotdot-update-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-hash-indexed-dir-dotdot-update-squeeze.patch
 new file mode 100644
-index 0000000..8ff4099
+index 0000000..24abdde
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-hash-indexed-dir-dotdot-update-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-hash-indexed-dir-dotdot-update-squeeze.patch
 @@ -0,0 +1,87 @@
-+Index: linux-source-2.6.32/fs/ext4/namei.c
++Index: linux-2.6-2.6.32/fs/ext4/namei.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-06-28 12:10:42.283981062 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-06-28 12:10:49.061664012 +0200
-+@@ -1526,6 +1526,72 @@
-+ 	return retval;
++--- linux-2.6-2.6.32.orig/fs/ext4/namei.c	2012-08-24 09:04:04.919794538 +0200
+++++ linux-2.6-2.6.32/fs/ext4/namei.c	2012-08-24 09:51:06.006526152 +0200
++@@ -1532,6 +1532,72 @@
++ 	return add_dirent_to_buf(handle, dentry, inode, de, bh);
 + }
 + 
 ++/* update ".." for hash-indexed directory, split the item "." if necessary */
@@ -1453,7 +1452,7 @@ index 0000000..8ff4099
 + /*
 +  *	ext4_add_entry()
 +  *
-+@@ -1553,6 +1619,9 @@
++@@ -1559,6 +1625,9 @@
 + 	if (!dentry->d_name.len)
 + 		return -EINVAL;
 + 	if (is_dx(dir)) {
@@ -1463,17 +1462,17 @@ index 0000000..8ff4099
 + 		retval = ext4_dx_add_entry(handle, dentry, inode);
 + 		if (!retval || (retval != ERR_BAD_DX_DIR))
 + 			return retval;
-diff --git a/ldiskfs/kernel_patches/patches/ext4-inode-version-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-inode-version-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-inode-version-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-inode-version-squeeze.patch
 new file mode 100644
-index 0000000..3d13724
+index 0000000..a86aea6
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-inode-version-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-inode-version-squeeze.patch
 @@ -0,0 +1,63 @@
-+Index: linux-source-2.6.32/fs/ext4/inode.c
++Index: linux-2.6-2.6.32/fs/ext4/inode.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/inode.c	2012-06-28 12:09:14.201666378 +0200
-++++ linux-source-2.6.32/fs/ext4/inode.c	2012-06-28 12:09:34.579776667 +0200
-+@@ -4985,11 +4985,11 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/inode.c	2012-08-23 14:51:38.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/inode.c	2012-08-23 14:54:21.832195670 +0200
++@@ -4875,11 +4875,11 @@
 + 	EXT4_INODE_GET_XTIME(i_atime, inode, raw_inode);
 + 	EXT4_EINODE_GET_XTIME(i_crtime, ei, raw_inode);
 + 
@@ -1488,7 +1487,7 @@ index 0000000..3d13724
 + 	}
 + 
 + 	ret = 0;
-+@@ -5199,11 +5199,11 @@
++@@ -5094,11 +5094,11 @@
 + 		for (block = 0; block < EXT4_N_BLOCKS; block++)
 + 			raw_inode->i_block[block] = ei->i_data[block];
 + 
@@ -1503,11 +1502,11 @@ index 0000000..3d13724
 + 		raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize);
 + 	}
 + 
-+Index: linux-source-2.6.32/fs/ext4/ialloc.c
++Index: linux-2.6-2.6.32/fs/ext4/ialloc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ialloc.c	2012-06-28 12:09:23.393677834 +0200
-++++ linux-source-2.6.32/fs/ext4/ialloc.c	2012-06-28 12:09:34.581668116 +0200
-+@@ -1011,6 +1011,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ialloc.c	2012-08-23 14:51:48.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ialloc.c	2012-08-23 14:54:21.834195646 +0200
++@@ -1018,6 +1018,7 @@
 + 	ei->i_dtime = 0;
 + 	ei->i_block_group = group;
 + 	ei->i_last_alloc_group = ~0;
@@ -1515,14 +1514,14 @@ index 0000000..3d13724
 + 
 + 	ext4_set_inode_flags(inode);
 + 	if (IS_DIRSYNC(inode))
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-06-28 12:09:30.485668675 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-06-28 12:09:34.581668116 +0200
-+@@ -799,8 +799,12 @@
-+ 	 */
-+ 	tid_t i_sync_tid;
-+ 	tid_t i_datasync_tid;
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-23 14:51:57.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-23 14:54:21.000000000 +0200
++@@ -704,8 +704,12 @@
++ 	struct list_head i_aio_dio_complete_list;
++ 	/* current io_end structure for async DIO write*/
++ 	ext4_io_end_t *cur_aio_dio;
 ++
 ++	__u64 i_fs_version;
 + };
@@ -1532,19 +1531,19 @@ index 0000000..3d13724
 + /*
 +  * File system states
 +  */
-diff --git a/ldiskfs/kernel_patches/patches/ext4-journal-callback-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-journal-callback-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-journal-callback-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-journal-callback-squeeze.patch
 new file mode 100644
-index 0000000..833fa12
+index 0000000..e84ff3f
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-journal-callback-2.6.32-vanilla.patch
-@@ -0,0 +1,464 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4_jbd2.h
++++ b/ldiskfs/kernel_patches/patches/ext4-journal-callback-squeeze.patch
+@@ -0,0 +1,461 @@
++Index: linux-2.6-2.6.32/fs/ext4/ext4_jbd2.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4_jbd2.h	2012-07-04 11:14:55.000000000 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4_jbd2.h	2012-07-04 11:28:07.509366730 +0200
-+@@ -106,6 +106,80 @@
-+ #define EXT4_MAXQUOTAS_INIT_BLOCKS(sb) (MAXQUOTAS*EXT4_QUOTA_INIT_BLOCKS(sb))
-+ #define EXT4_MAXQUOTAS_DEL_BLOCKS(sb) (MAXQUOTAS*EXT4_QUOTA_DEL_BLOCKS(sb))
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4_jbd2.h	2012-08-24 10:44:26.235517786 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4_jbd2.h	2012-08-24 10:44:28.296492020 +0200
++@@ -102,6 +102,80 @@
++ #define EXT4_QUOTA_DEL_BLOCKS(sb) 0
++ #endif
 + 
 ++/**
 ++ *   struct ext4_journal_cb_entry - Base structure for callback information.
@@ -1623,10 +1622,10 @@ index 0000000..833fa12
 + int
 + ext4_mark_iloc_dirty(handle_t *handle,
 + 		     struct inode *inode,
-+Index: linux-source-2.6.32/fs/ext4/mballoc.h
++Index: linux-2.6-2.6.32/fs/ext4/mballoc.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/mballoc.h	2012-07-04 11:15:03.000000000 +0200
-++++ linux-source-2.6.32/fs/ext4/mballoc.h	2012-07-04 11:28:07.509366730 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/mballoc.h	2012-08-24 10:44:26.238517747 +0200
+++++ linux-2.6-2.6.32/fs/ext4/mballoc.h	2012-08-24 10:44:28.296492020 +0200
 +@@ -96,23 +96,24 @@
 +  */
 + #define MB_DEFAULT_GROUP_PREALLOC	512
@@ -1661,10 +1660,10 @@ index 0000000..833fa12
 + };
 + 
 + struct ext4_prealloc_space {
-+Index: linux-source-2.6.32/fs/ext4/mballoc.c
++Index: linux-2.6-2.6.32/fs/ext4/mballoc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/mballoc.c	2012-07-04 11:15:26.913377451 +0200
-++++ linux-source-2.6.32/fs/ext4/mballoc.c	2012-07-04 11:28:07.513381629 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/mballoc.c	2012-08-24 10:44:26.238517747 +0200
+++++ linux-2.6-2.6.32/fs/ext4/mballoc.c	2012-08-24 10:44:28.300491970 +0200
 +@@ -21,6 +21,7 @@
 +  * mballoc.c contains the multiblocks allocation routines
 +  */
@@ -1688,7 +1687,7 @@ index 0000000..833fa12
 + 
 + static inline void *mb_correct_addr_and_bit(int *bit, void *addr)
 + {
-+@@ -2656,8 +2657,6 @@
++@@ -2608,8 +2609,6 @@
 + 		}
 + 	}
 + 
@@ -1697,7 +1696,7 @@ index 0000000..833fa12
 + 	return 0;
 + }
 + 
-+@@ -2760,56 +2759,52 @@
++@@ -2701,53 +2700,52 @@
 +  * This function is called by the jbd2 layer once the commit has finished,
 +  * so we know we can free the blocks that were released with that commit.
 +  */
@@ -1712,6 +1711,7 @@ index 0000000..833fa12
 + 	struct ext4_group_info *db;
 + 	int err, count = 0, count2 = 0;
 +-	struct ext4_free_data *entry;
++-	ext4_fsblk_t discard_block;
 +-	struct list_head *l, *ltmp;
 +-
 +-	list_for_each_safe(l, ltmp, &txn->t_private_list) {
@@ -1722,26 +1722,6 @@ index 0000000..833fa12
 ++	mb_debug(1, "gonna free %u blocks in group %u (0x%p):",
 ++		 entry->efd_count, entry->efd_group, entry);
 + 
-+-		if (test_opt(sb, DISCARD)) {
-+-			int ret;
-+-			ret = ext4_issue_discard(sb, entry->group,
-+-					entry->start_blk, entry->count);
-+-			if (ret == EOPNOTSUPP) {
-+-				ext4_warning(sb, __func__,
-+-					"discard not supported, disabling");
-+-				clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD);
-+-			}
-++	if (test_opt(sb, DISCARD)) {
-++		int ret;
-++		ret = ext4_issue_discard(sb, entry->efd_group,
-++				entry->efd_start_blk, entry->efd_count);
-++		if (unlikely(ret == -EOPNOTSUPP)) {
-++			ext4_warning(sb, __func__, "discard not supported, "
-++					 "disabling");
-++			clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD);
-+ 		}
-++	}
-+ 
 +-		err = ext4_mb_load_buddy(sb, entry->group, &e4b);
 +-		/* we expect to find existing buddy because it's pinned */
 +-		BUG_ON(err != 0);
@@ -1761,8 +1741,24 @@ index 0000000..833fa12
 +-			 */
 +-			page_cache_release(e4b.bd_buddy_page);
 +-			page_cache_release(e4b.bd_bitmap_page);
-+-		}
+++	if (test_opt(sb, DISCARD)) {
+++		int ret;
+++		ret = ext4_issue_discard(sb, entry->efd_group,
+++					 entry->efd_start_blk, entry->efd_count);
+++		if (unlikely(ret == -EOPNOTSUPP)) {
+++			ext4_warning(sb, "discard not supported, "
+++					 "disabling");
+++			clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD);
++ 		}
 +-		ext4_unlock_group(sb, entry->group);
++-		discard_block = (ext4_fsblk_t) entry->group * EXT4_BLOCKS_PER_GROUP(sb)
++-			+ entry->start_blk
++-			+ le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
++-		trace_ext4_discard_blocks(sb, (unsigned long long)discard_block,
++-					  entry->count);
++-		sb_issue_discard(sb, discard_block, entry->count);
+++	}
++ 
 +-		kmem_cache_free(ext4_free_ext_cachep, entry);
 +-		ext4_mb_release_desc(&e4b);
 ++	err = ext4_mb_load_buddy(sb, entry->efd_group, &e4b);
@@ -1771,11 +1767,11 @@ index 0000000..833fa12
 ++
 ++	db = e4b.bd_info;
 ++	/* there are blocks to put in buddy to make them really free */
-++		count += entry->efd_count;
+++	count += entry->efd_count;
 ++	count2++;
 ++	ext4_lock_group(sb, entry->efd_group);
 ++	/* Take it out of per group rb tree */
-++		rb_erase(&entry->efd_node, &(db->bb_free_root));
+++	rb_erase(&entry->efd_node, &(db->bb_free_root));
 ++	mb_free_blocks(NULL, &e4b, entry->efd_start_blk, entry->efd_count);
 ++
 ++	if (!db->bb_free_root.rb_node) {
@@ -1791,7 +1787,7 @@ index 0000000..833fa12
 + 
 + 	mb_debug(1, "freed %u blocks in %u structures\n", count, count2);
 + }
-+@@ -2861,22 +2856,22 @@
++@@ -2799,22 +2797,22 @@
 + 		kmem_cache_create("ext4_alloc_context",
 + 				     sizeof(struct ext4_allocation_context),
 + 				     0, SLAB_RECLAIM_ACCOUNT, NULL);
@@ -1827,7 +1823,7 @@ index 0000000..833fa12
 + }
 + 
 + void exit_ext4_mballoc(void)
-+@@ -2888,7 +2883,7 @@
++@@ -2826,7 +2824,7 @@
 + 	rcu_barrier();
 + 	kmem_cache_destroy(ext4_pspace_cachep);
 + 	kmem_cache_destroy(ext4_ac_cachep);
@@ -1836,7 +1832,7 @@ index 0000000..833fa12
 + 	ext4_remove_debugfs_entry();
 + }
 + 
-+@@ -3430,8 +3425,8 @@
++@@ -3356,8 +3354,8 @@
 + 	n = rb_first(&(grp->bb_free_root));
 + 
 + 	while (n) {
@@ -1847,7 +1843,7 @@ index 0000000..833fa12
 + 		n = rb_next(n);
 + 	}
 + 	return;
-+@@ -4675,11 +4670,11 @@
++@@ -4600,11 +4598,11 @@
 +  * AND the blocks are associated with the same group.
 +  */
 + static int can_merge(struct ext4_free_data *entry1,
@@ -1863,7 +1859,7 @@ index 0000000..833fa12
 + 		return 1;
 + 	return 0;
 + }
-+@@ -4692,7 +4687,6 @@
++@@ -4617,7 +4615,6 @@
 + 	struct ext4_free_data *entry;
 + 	struct ext4_group_info *db = e4b->bd_info;
 + 	struct super_block *sb = e4b->bd_sb;
@@ -1871,7 +1867,7 @@ index 0000000..833fa12
 + 	struct rb_node **n = &db->bb_free_root.rb_node, *node;
 + 	struct rb_node *parent = NULL, *new_node;
 + 
-+@@ -4700,8 +4694,8 @@
++@@ -4625,8 +4622,8 @@
 + 	BUG_ON(e4b->bd_bitmap_page == NULL);
 + 	BUG_ON(e4b->bd_buddy_page == NULL);
 + 
@@ -1882,7 +1878,7 @@ index 0000000..833fa12
 + 
 + 	if (!*n) {
 + 		/* first free block exent. We need to
-+@@ -4714,15 +4708,15 @@
++@@ -4639,15 +4636,15 @@
 + 	}
 + 	while (*n) {
 + 		parent = *n;
@@ -1902,7 +1898,7 @@ index 0000000..833fa12
 + 			return 0;
 + 		}
 + 	}
-+@@ -4733,34 +4727,29 @@
++@@ -4658,34 +4655,29 @@
 + 	/* Now try to see the extent can be merged to left and right */
 + 	node = rb_prev(new_node);
 + 	if (node) {
@@ -1948,7 +1944,7 @@ index 0000000..833fa12
 + 	return 0;
 + }
 + 
-+@@ -4881,11 +4870,11 @@
++@@ -4806,11 +4798,11 @@
 + 		 * blocks being freed are metadata. these blocks shouldn't
 + 		 * be used until this transaction is committed
 + 		 */
@@ -1965,11 +1961,11 @@ index 0000000..833fa12
 + 
 + 		ext4_lock_group(sb, block_group);
 + 		mb_clear_bits(bitmap_bh->b_data, bit, count);
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-04 11:15:26.000000000 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-04 11:28:07.517374742 +0200
-+@@ -303,6 +303,23 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-24 10:44:26.241517711 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-24 10:44:28.307491882 +0200
++@@ -300,6 +300,23 @@
 + 
 + EXPORT_SYMBOL(ext4_journal_abort_handle);
 + 
@@ -1993,29 +1989,29 @@ index 0000000..833fa12
 + /* Deal with the reporting of failure conditions on a filesystem such as
 +  * inconsistencies detected or read IO failures.
 +  *
-+@@ -3033,6 +3050,8 @@
++@@ -2962,6 +2979,8 @@
 + 	}
 + 	set_task_ioprio(sbi->s_journal->j_task, journal_ioprio);
 + 
 ++	sbi->s_journal->j_commit_callback = ext4_journal_commit_callback;
 ++
 + no_journal:
++ 
 + 	if (test_opt(sb, NOBH)) {
-+ 		if (!(test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_WRITEBACK_DATA)) {
-diff --git a/ldiskfs/kernel_patches/patches/ext4-kill-dx_root-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-kill-dx_root-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-kill-dx_root-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-kill-dx_root-squeeze.patch
 new file mode 100644
-index 0000000..fa4aa0d
+index 0000000..ee6a62e
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-kill-dx_root-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-kill-dx_root-squeeze.patch
 @@ -0,0 +1,237 @@
 +removes static definition of dx_root struct. so that "." and ".." dirent can
 +have extra data. This patch does not change any functionality but is required for
 +ext4_data_in_dirent patch.
 + 
-+Index: linux-source-2.6.32/fs/ext4/namei.c
++Index: linux-2.6-2.6.32/fs/ext4/namei.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-06-28 12:10:49.061664012 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-06-28 12:10:52.005665948 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/namei.c	2012-08-24 10:00:39.469356830 +0200
+++++ linux-2.6-2.6.32/fs/ext4/namei.c	2012-08-24 10:06:08.962237653 +0200
 +@@ -114,22 +114,13 @@
 +  * hash version mod 4 should never be 0.  Sincerely, the paranoia department.
 +  */
@@ -2071,7 +2067,7 @@ index 0000000..fa4aa0d
 + 	struct buffer_head *bh;
 + 	struct dx_frame *frame = frame_in;
 + 	u32 hash;
-+@@ -405,18 +406,18 @@
++@@ -405,17 +406,17 @@
 + 	frame->bh = NULL;
 + 	if (!(bh = ext4_bread (NULL,dir, 0, 0, err)))
 + 		goto fail;
@@ -2083,9 +2079,8 @@ index 0000000..fa4aa0d
 ++	if (info->hash_version != DX_HASH_TEA &&
 ++	    info->hash_version != DX_HASH_HALF_MD4 &&
 ++	    info->hash_version != DX_HASH_LEGACY) {
-+ 		ext4_warning(dir->i_sb, __func__,
-+ 			     "Unrecognised inode hash code %d for directory "
-+-                            "#%lu", root->info.hash_version, dir->i_ino);
++ 		ext4_warning(dir->i_sb, "Unrecognised inode hash code %d for directory "
++-			     "#%lu", root->info.hash_version, dir->i_ino);
 ++			     "#%lu", info->hash_version, dir->i_ino);
 + 		brelse(bh);
 + 		*err = ERR_BAD_DX_DIR;
@@ -2096,7 +2091,7 @@ index 0000000..fa4aa0d
 + 	if (hinfo->hash_version <= DX_HASH_TEA)
 + 		hinfo->hash_version += EXT4_SB(dir->i_sb)->s_hash_unsigned;
 + 	hinfo->seed = EXT4_SB(dir->i_sb)->s_hash_seed;
-+@@ -424,29 +425,28 @@
++@@ -423,29 +424,28 @@
 + 		ext4fs_dirhash(d_name->name, d_name->len, hinfo);
 + 	hash = hinfo->hash;
 + 
@@ -2132,7 +2127,7 @@ index 0000000..fa4aa0d
 + 		ext4_warning(dir->i_sb, __func__,
 + 			     "dx entry: limit != root limit");
 + 		brelse(bh);
-+@@ -528,10 +528,12 @@
++@@ -527,10 +527,12 @@
 + 
 + static void dx_release (struct dx_frame *frames)
 + {
@@ -2146,7 +2141,7 @@ index 0000000..fa4aa0d
 + 		brelse(frames[1].bh);
 + 	brelse(frames[0].bh);
 + }
-+@@ -1442,17 +1444,16 @@
++@@ -1450,17 +1452,16 @@
 + 	const char	*name = dentry->d_name.name;
 + 	int		namelen = dentry->d_name.len;
 + 	struct buffer_head *bh2;
@@ -2166,11 +2161,12 @@ index 0000000..fa4aa0d
 + 
 + 	blocksize =  dir->i_sb->s_blocksize;
 + 	dxtrace(printk(KERN_DEBUG "Creating index: inode %lu\n", dir->i_ino));
-+@@ -1462,20 +1463,20 @@
++@@ -1470,20 +1471,21 @@
 + 		brelse(bh);
 + 		return retval;
 + 	}
 +-	root = (struct dx_root *) bh->b_data;
+++
 ++	dot_de = (struct ext4_dir_entry_2 *) bh->b_data;
 ++	dotdot_de = ext4_next_entry(dot_de, blocksize);
 + 
@@ -2180,7 +2176,7 @@ index 0000000..fa4aa0d
 +-		ext4_rec_len_from_disk(fde->rec_len, blocksize));
 +-	if ((char *) de >= (((char *) root) + blocksize)) {
 ++	de = (struct ext4_dir_entry_2 *)((char *)dotdot_de +
-++		ext4_rec_len_from_disk(dotdot_de->rec_len, blocksize));
+++			ext4_rec_len_from_disk(dotdot_de->rec_len, blocksize));
 ++	if ((char *) de >= (((char *) dot_de) + blocksize)) {
 + 		ext4_error(dir->i_sb, __func__,
 + 			   "invalid rec_len for '..' in inode %lu",
@@ -2193,7 +2189,7 @@ index 0000000..fa4aa0d
 + 
 + 	/* Allocate new block for the 0th block's dirents */
 + 	bh2 = ext4_append(handle, dir, &block, &retval);
-+@@ -1494,19 +1495,23 @@
++@@ -1502,19 +1504,23 @@
 + 	de->rec_len = ext4_rec_len_to_disk(data1 + blocksize - (char *) de,
 + 					   blocksize);
 + 	/* Initialize the root; the dot dirents already exist */
@@ -2226,7 +2222,7 @@ index 0000000..fa4aa0d
 + 	if (hinfo.hash_version <= DX_HASH_TEA)
 + 		hinfo.hash_version += EXT4_SB(dir->i_sb)->s_hash_unsigned;
 + 	hinfo.seed = EXT4_SB(dir->i_sb)->s_hash_seed;
-+@@ -1756,6 +1761,7 @@
++@@ -1758,6 +1764,7 @@
 + 				goto journal_error;
 + 			brelse (bh2);
 + 		} else {
@@ -2234,7 +2230,7 @@ index 0000000..fa4aa0d
 + 			dxtrace(printk(KERN_DEBUG
 + 				       "Creating second level index...\n"));
 + 			memcpy((char *) entries2, (char *) entries,
-+@@ -1765,7 +1771,9 @@
++@@ -1767,7 +1774,9 @@
 + 			/* Set up root */
 + 			dx_set_count(entries, 1);
 + 			dx_set_block(entries + 0, newblock);
@@ -2245,17 +2241,17 @@ index 0000000..fa4aa0d
 + 
 + 			/* Add new access path frame */
 + 			frame = frames + 1;
-diff --git a/ldiskfs/kernel_patches/patches/ext4-large-eas-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-large-eas-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-large-eas-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-large-eas-squeeze.patch
 new file mode 100644
-index 0000000..f61a756
+index 0000000..9bce44c
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-large-eas-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-large-eas-squeeze.patch
 @@ -0,0 +1,736 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:45:11.140204588 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:45:13.167310617 +0200
-+@@ -1262,6 +1262,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-24 10:23:40.791087985 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-24 10:24:02.646814750 +0200
++@@ -1131,6 +1131,7 @@
 + #define EXT4_FEATURE_INCOMPAT_64BIT		0x0080
 + #define EXT4_FEATURE_INCOMPAT_MMP               0x0100
 + #define EXT4_FEATURE_INCOMPAT_FLEX_BG		0x0200
@@ -2263,7 +2259,7 @@ index 0000000..f61a756
 + #define EXT4_FEATURE_INCOMPAT_DIRDATA		0x1000
 + 
 + #define EXT4_FEATURE_COMPAT_SUPP	EXT2_FEATURE_COMPAT_EXT_ATTR
-+@@ -1271,6 +1272,7 @@
++@@ -1140,6 +1141,7 @@
 + 					 EXT4_FEATURE_INCOMPAT_EXTENTS| \
 + 					 EXT4_FEATURE_INCOMPAT_64BIT| \
 + 					 EXT4_FEATURE_INCOMPAT_FLEX_BG| \
@@ -2271,7 +2267,7 @@ index 0000000..f61a756
 + 					 EXT4_FEATURE_INCOMPAT_MMP| \
 + 					 EXT4_FEATURE_INCOMPAT_DIRDATA)
 + 
-+@@ -1586,6 +1588,12 @@
++@@ -1438,6 +1440,12 @@
 + #endif
 + 
 + /*
@@ -2284,10 +2280,10 @@ index 0000000..f61a756
 +  * Function prototypes
 +  */
 + 
-+Index: linux-source-2.6.32/fs/ext4/xattr.c
++Index: linux-2.6-2.6.32/fs/ext4/xattr.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/xattr.c	2012-07-05 11:44:34.954703493 +0200
-++++ linux-source-2.6.32/fs/ext4/xattr.c	2012-07-05 11:45:13.167310617 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/xattr.c	2012-08-23 15:08:50.633334162 +0200
+++++ linux-2.6-2.6.32/fs/ext4/xattr.c	2012-08-24 10:24:02.649814711 +0200
 +@@ -168,19 +168,26 @@
 + }
 + 
@@ -2372,7 +2368,7 @@ index 0000000..f61a756
 ++
 ++	ea_inode = ext4_iget(parent->i_sb, ea_ino);
 ++	if (ea_inode == NULL || is_bad_inode(ea_inode)) {
-++		ext4_error(parent->i_sb, __func__, "error while reading EA inode %d",
+++		ext4_error(parent->i_sb, "error while reading EA inode %d",
 ++			   ea_ino);
 ++		*err = -EIO;
 ++		return NULL;
@@ -2380,14 +2376,14 @@ index 0000000..f61a756
 ++
 ++	if (ea_inode->i_xattr_inode_parent != parent->i_ino ||
 ++	    ea_inode->i_generation != parent->i_generation) {
-++		ext4_error(parent->i_sb, __func__, "Backpointer from EA inode %d "
+++		ext4_error(parent->i_sb, "Backpointer from EA inode %d "
 ++			   "to parent invalid.", ea_ino);
 ++		*err = -EINVAL;
 ++		goto error;
 ++	}
 ++
 ++	if (!(EXT4_I(ea_inode)->i_flags & EXT4_EA_INODE_FL)) {
-++		ext4_error(parent->i_sb, __func__, "EA inode %d does not have "
+++		ext4_error(parent->i_sb, "EA inode %d does not have "
 ++			   "EXT4_EA_INODE_FL flag set.\n", ea_ino);
 ++		*err = -EINVAL;
 ++		goto error;
@@ -2815,7 +2811,7 @@ index 0000000..f61a756
 + 	};
 + 	struct ext4_xattr_ibody_find is = {
 + 		.s = { .not_found = -ENODATA, },
-+@@ -1034,6 +1321,15 @@
++@@ -1033,6 +1320,15 @@
 + 					goto cleanup;
 + 			}
 + 			error = ext4_xattr_block_set(handle, inode, &i, &bs);
@@ -2831,7 +2827,7 @@ index 0000000..f61a756
 + 			if (error)
 + 				goto cleanup;
 + 			if (!is.s.not_found) {
-+@@ -1081,10 +1377,25 @@
++@@ -1080,10 +1376,25 @@
 + 	       const void *value, size_t value_len, int flags)
 + {
 + 	handle_t *handle;
@@ -2858,7 +2854,7 @@ index 0000000..f61a756
 + 	if (IS_ERR(handle)) {
 + 		error = PTR_ERR(handle);
 + 	} else {
-+@@ -1094,7 +1405,7 @@
++@@ -1093,7 +1404,7 @@
 + 					      value, value_len, flags);
 + 		error2 = ext4_journal_stop(handle);
 + 		if (error == -ENOSPC &&
@@ -2867,7 +2863,7 @@ index 0000000..f61a756
 + 			goto retry;
 + 		if (error == 0)
 + 			error = error2;
-+@@ -1116,7 +1427,7 @@
++@@ -1115,7 +1426,7 @@
 + 
 + 	/* Adjust the value offsets of the entries */
 + 	for (; !IS_LAST_ENTRY(last); last = EXT4_XATTR_NEXT(last)) {
@@ -2876,7 +2872,7 @@ index 0000000..f61a756
 + 			new_offs = le16_to_cpu(last->e_value_offs) +
 + 							value_offs_shift;
 + 			BUG_ON(new_offs + le32_to_cpu(last->e_value_size)
-+@@ -1355,15 +1666,41 @@
++@@ -1352,15 +1663,41 @@
 + /*
 +  * ext4_xattr_delete_inode()
 +  *
@@ -2898,7 +2894,7 @@ index 0000000..f61a756
 ++	struct ext4_iloc iloc;
 ++	struct ext4_xattr_entry *entry;
 ++	int error;
-++
++ 
 ++	if (!ext4_test_inode_state(inode, EXT4_STATE_XATTR))
 ++		goto delete_external_ea;
 ++
@@ -2915,12 +2911,12 @@ index 0000000..f61a756
 ++			entry->e_value_inum = 0;
 ++		}
 ++	}
-+ 
+++
 ++delete_external_ea:
 + 	if (!EXT4_I(inode)->i_file_acl)
 + 		goto cleanup;
 + 	bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl);
-+@@ -1380,6 +1717,16 @@
++@@ -1377,6 +1714,16 @@
 + 			EXT4_I(inode)->i_file_acl);
 + 		goto cleanup;
 + 	}
@@ -2937,7 +2933,7 @@ index 0000000..f61a756
 + 	ext4_xattr_release_block(handle, inode, bh);
 + 	EXT4_I(inode)->i_file_acl = 0;
 + 
-+@@ -1454,10 +1801,9 @@
++@@ -1451,10 +1798,9 @@
 + 		    entry1->e_name_index != entry2->e_name_index ||
 + 		    entry1->e_name_len != entry2->e_name_len ||
 + 		    entry1->e_value_size != entry2->e_value_size ||
@@ -2949,7 +2945,7 @@ index 0000000..f61a756
 + 		if (memcmp((char *)header1 + le16_to_cpu(entry1->e_value_offs),
 + 			   (char *)header2 + le16_to_cpu(entry2->e_value_offs),
 + 			   le32_to_cpu(entry1->e_value_size)))
-+@@ -1542,7 +1888,7 @@
++@@ -1539,7 +1885,7 @@
 + 		       *name++;
 + 	}
 + 
@@ -2958,10 +2954,10 @@ index 0000000..f61a756
 + 		__le32 *value = (__le32 *)((char *)header +
 + 			le16_to_cpu(entry->e_value_offs));
 + 		for (n = (le32_to_cpu(entry->e_value_size) +
-+Index: linux-source-2.6.32/fs/ext4/xattr.h
++Index: linux-2.6-2.6.32/fs/ext4/xattr.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/xattr.h	2012-07-04 15:59:27.195199155 +0200
-++++ linux-source-2.6.32/fs/ext4/xattr.h	2012-07-05 11:45:13.167310617 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/xattr.h	2012-08-23 14:43:19.026481882 +0200
+++++ linux-2.6-2.6.32/fs/ext4/xattr.h	2012-08-24 10:24:02.708813971 +0200
 +@@ -38,7 +38,7 @@
 + 	__u8	e_name_len;	/* length of name */
 + 	__u8	e_name_index;	/* attribute name index */
@@ -2987,16 +2983,16 @@ index 0000000..f61a756
 + # ifdef CONFIG_EXT4_FS_XATTR
 + 
 + extern struct xattr_handler ext4_xattr_user_handler;
-diff --git a/ldiskfs/kernel_patches/patches/ext4-lookup-dotdot-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-lookup-dotdot-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-lookup-dotdot-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-lookup-dotdot-squeeze.patch
 new file mode 100644
-index 0000000..2d40432
+index 0000000..1fd1f81
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-lookup-dotdot-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-lookup-dotdot-squeeze.patch
 @@ -0,0 +1,43 @@
-+Index: linux-source-2.6.32/fs/ext4/namei.c
++Index: linux-2.6-2.6.32/fs/ext4/namei.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-07-04 15:58:09.007716563 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-07-04 15:58:23.674708268 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/namei.c	2012-08-23 15:00:38.860482167 +0200
+++++ linux-2.6-2.6.32/fs/ext4/namei.c	2012-08-23 15:04:40.478461526 +0200
 +@@ -1098,6 +1098,38 @@
 + 			}
 + 		}
@@ -3036,17 +3032,17 @@ index 0000000..2d40432
 + 	return d_splice_alias(inode, dentry);
 + }
 + 
-diff --git a/ldiskfs/kernel_patches/patches/ext4-map_inode_page-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-map_inode_page-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-map_inode_page-2.6.18-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-map_inode_page-2.6.18-squeeze.patch
 new file mode 100644
-index 0000000..f260449
+index 0000000..03cc31d
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-map_inode_page-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-map_inode_page-2.6.18-squeeze.patch
 @@ -0,0 +1,87 @@
-+Index: linux-source-2.6.32/fs/ext4/inode.c
++Index: linux-2.6-2.6.32/fs/ext4/inode.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/inode.c	2012-06-28 12:08:38.957670045 +0200
-++++ linux-source-2.6.32/fs/ext4/inode.c	2012-06-28 12:09:14.201666378 +0200
-+@@ -5905,3 +5905,67 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/inode.c	2012-08-23 14:43:23.768422599 +0200
+++++ linux-2.6-2.6.32/fs/ext4/inode.c	2012-08-23 14:51:38.287240264 +0200
++@@ -5793,3 +5793,67 @@
 + 	up_read(&inode->i_alloc_sem);
 + 	return ret;
 + }
@@ -3114,11 +3110,11 @@ index 0000000..f260449
 ++	ext4_journal_stop(handle);
 ++	return rc;
 ++}
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-06-28 12:08:39.101667098 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-06-28 12:09:14.205662995 +0200
-+@@ -4052,6 +4052,10 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-23 14:43:23.768422599 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-23 14:51:38.290240225 +0200
++@@ -4024,6 +4024,10 @@
 + 	exit_ext4_system_zone();
 + }
 + 
@@ -3129,17 +3125,17 @@ index 0000000..f260449
 + MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
 + MODULE_DESCRIPTION("Fourth Extended Filesystem");
 + MODULE_LICENSE("GPL");
-diff --git a/ldiskfs/kernel_patches/patches/ext4-max-dir-size-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-max-dir-size-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-max-dir-size-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-max-dir-size-squeeze.patch
 new file mode 100644
-index 0000000..e8f1f3f
+index 0000000..fe8780e
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-max-dir-size-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-max-dir-size-squeeze.patch
 @@ -0,0 +1,67 @@
-+Index: linux-source-2.6.32/fs/ext4/ialloc.c
++Index: linux-2.6-2.6.32/fs/ext4/ialloc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ialloc.c	2012-07-05 11:44:25.210698050 +0200
-++++ linux-source-2.6.32/fs/ext4/ialloc.c	2012-07-05 11:44:31.987209607 +0200
-+@@ -818,11 +818,15 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ialloc.c	2012-08-23 15:01:02.206190305 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ialloc.c	2012-08-23 15:05:04.016167266 +0200
++@@ -825,11 +825,15 @@
 + 	sb = dir->i_sb;
 + 	ngroups = ext4_get_groups_count(sb);
 + 	trace_ext4_request_inode(dir, mode);
@@ -3156,11 +3152,11 @@ index 0000000..e8f1f3f
 + 
 + 	if (!goal)
 + 		goal = sbi->s_inode_goal;
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-05 11:44:26.539712783 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-05 11:44:31.991217543 +0200
-+@@ -2278,6 +2278,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-23 15:04:01.503948776 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-23 15:05:04.020167215 +0200
++@@ -2204,6 +2204,7 @@
 + EXT4_ATTR_OFFSET(inode_readahead_blks, 0644, sbi_ui_show,
 + 		 inode_readahead_blks_store, s_inode_readahead_blks);
 + EXT4_RW_ATTR_SBI_UI(inode_goal, s_inode_goal);
@@ -3168,7 +3164,7 @@ index 0000000..e8f1f3f
 + EXT4_RW_ATTR_SBI_UI(mb_stats, s_mb_stats);
 + EXT4_RW_ATTR_SBI_UI(mb_max_to_scan, s_mb_max_to_scan);
 + EXT4_RW_ATTR_SBI_UI(mb_min_to_scan, s_mb_min_to_scan);
-+@@ -2292,6 +2293,7 @@
++@@ -2218,6 +2219,7 @@
 + 	ATTR_LIST(lifetime_write_kbytes),
 + 	ATTR_LIST(inode_readahead_blks),
 + 	ATTR_LIST(inode_goal),
@@ -3176,11 +3172,11 @@ index 0000000..e8f1f3f
 + 	ATTR_LIST(mb_stats),
 + 	ATTR_LIST(mb_max_to_scan),
 + 	ATTR_LIST(mb_min_to_scan),
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:44:26.535714680 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:44:31.991217543 +0200
-+@@ -1108,6 +1108,8 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-23 15:04:01.495948876 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-23 15:05:04.041166950 +0200
++@@ -1011,6 +1011,8 @@
 + 	unsigned int s_log_groups_per_flex;
 + 	struct flex_groups *s_flex_groups;
 + 
@@ -3189,7 +3185,7 @@ index 0000000..e8f1f3f
 + 	/* workqueue for dio unwritten */
 + 	struct workqueue_struct *dio_unwritten_wq;
 + 
-+@@ -1516,6 +1518,12 @@
++@@ -1368,6 +1370,12 @@
 + #define EXT4_MMP_MAX_CHECK_INTERVAL    300UL
 + 
 + /*
@@ -3202,28 +3198,28 @@ index 0000000..e8f1f3f
 +  * Function prototypes
 +  */
 + 
-diff --git a/ldiskfs/kernel_patches/patches/ext4-mballoc-extra-checks-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-mballoc-extra-checks-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-mballoc-extra-checks-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-mballoc-extra-checks-squeeze.patch
 new file mode 100644
-index 0000000..f83f84e
+index 0000000..ad12c00
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-mballoc-extra-checks-2.6.32-vanilla.patch
-@@ -0,0 +1,317 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++++ b/ldiskfs/kernel_patches/patches/ext4-mballoc-extra-checks-squeeze.patch
+@@ -0,0 +1,313 @@
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:44:36.923210008 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:44:39.251702342 +0200
-+@@ -1875,6 +1875,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-23 15:11:13.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-23 15:18:52.481810019 +0200
++@@ -1720,6 +1720,7 @@
++ 	ext4_grpblk_t	bb_free;	/* total free blocks */
 + 	ext4_grpblk_t	bb_fragments;	/* nr of freespace fragments */
-+ 	ext4_grpblk_t	bb_largest_free_order;/* order of largest frag in BG */
 + 	struct          list_head bb_prealloc_list;
 ++	unsigned long   bb_prealloc_nr;
 + #ifdef DOUBLE_CHECK
 + 	void            *bb_bitmap;
 + #endif
-+Index: linux-source-2.6.32/fs/ext4/mballoc.c
++Index: linux-2.6-2.6.32/fs/ext4/mballoc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/mballoc.c	2012-07-05 11:44:36.923210008 +0200
-++++ linux-source-2.6.32/fs/ext4/mballoc.c	2012-07-05 11:44:39.251702342 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/mballoc.c	2012-08-23 15:11:13.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/mballoc.c	2012-08-23 15:18:52.485809970 +0200
 +@@ -337,7 +337,7 @@
 + static struct kmem_cache *ext4_pspace_cachep;
 + static struct kmem_cache *ext4_ac_cachep;
@@ -3233,7 +3229,7 @@ index 0000000..f83f84e
 + 					ext4_group_t group);
 + static void ext4_mb_generate_from_freelist(struct super_block *sb, void *bitmap,
 + 						ext4_group_t group);
-+@@ -680,7 +680,7 @@
++@@ -659,7 +659,7 @@
 + }
 + 
 + static noinline_for_stack
@@ -3242,7 +3238,7 @@ index 0000000..f83f84e
 + 				void *buddy, void *bitmap, ext4_group_t group)
 + {
 + 	struct ext4_group_info *grp = ext4_get_group_info(sb, group);
-+@@ -712,14 +712,13 @@
++@@ -691,14 +691,13 @@
 + 	grp->bb_fragments = fragments;
 + 
 + 	if (free != grp->bb_free) {
@@ -3256,15 +3252,15 @@ index 0000000..f83f84e
 +-		grp->bb_free = free;
 ++		struct ext4_group_desc *gdp;
 ++		gdp = ext4_get_group_desc (sb, group, NULL);
-++		ext4_error(sb, __func__, "group %lu: %u blocks in bitmap, %u in bb, "
+++		ext4_error(sb, "group %lu: %u blocks in bitmap, %u in bb, "
 ++			"%u in gd, %lu pa's\n", (long unsigned int)group,
 ++			free, grp->bb_free, ext4_free_blks_count(sb, gdp),
 ++			grp->bb_prealloc_nr);
 ++		return -EIO;
 + 	}
-+ 	mb_set_largest_free_order(sb, grp);
 + 
-+@@ -730,6 +729,8 @@
++ 	clear_bit(EXT4_GROUP_INFO_NEED_INIT_BIT, &(grp->bb_state));
++@@ -708,6 +707,8 @@
 + 	EXT4_SB(sb)->s_mb_buddies_generated++;
 + 	EXT4_SB(sb)->s_mb_generation_time += period;
 + 	spin_unlock(&EXT4_SB(sb)->s_bal_lock);
@@ -3273,25 +3269,25 @@ index 0000000..f83f84e
 + }
 + 
 + /* The buddy information is attached the buddy cache inode
-+@@ -862,7 +863,7 @@
-+ 
-+ 	err = 0;
++@@ -839,7 +840,7 @@
 + 	first_block = page->index * blocks_per_page;
++ 	/* init the page  */
++ 	memset(page_address(page), 0xff, PAGE_CACHE_SIZE);
 +-	for (i = 0; i < blocks_per_page; i++) {
 ++	for (i = 0; i < blocks_per_page && err == 0; i++) {
 + 		int group;
 + 		struct ext4_group_info *grinfo;
 + 
-+@@ -899,7 +900,7 @@
++@@ -874,7 +875,7 @@
++ 			 * incore got set to the group block bitmap below
++ 			 */
 + 			ext4_lock_group(sb, group);
-+ 			/* init the page  */
-+ 			memset(data, 0xff, blocksize);
 +-			ext4_mb_generate_buddy(sb, data, incore, group);
 ++			err = ext4_mb_generate_buddy(sb, data, incore, group);
 + 			ext4_unlock_group(sb, group);
 + 			incore = NULL;
 + 		} else {
-+@@ -913,7 +914,7 @@
++@@ -888,7 +889,7 @@
 + 			memcpy(data, bitmap, blocksize);
 + 
 + 			/* mark all preallocated blks used in in-core bitmap */
@@ -3300,7 +3296,7 @@ index 0000000..f83f84e
 + 			ext4_mb_generate_from_freelist(sb, data, group);
 + 			ext4_unlock_group(sb, group);
 + 
-+@@ -923,7 +924,8 @@
++@@ -898,7 +899,8 @@
 + 			incore = data;
 + 		}
 + 	}
@@ -3310,7 +3306,7 @@ index 0000000..f83f84e
 + 
 + out:
 + 	if (bh) {
-+@@ -2188,9 +2190,11 @@
++@@ -2141,9 +2143,11 @@
 + static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
 + {
 + 	struct super_block *sb = seq->private;
@@ -3322,7 +3318,7 @@ index 0000000..f83f84e
 + 	struct ext4_buddy e4b;
 + 	struct sg {
 + 		struct ext4_group_info info;
-+@@ -2199,10 +2203,10 @@
++@@ -2152,10 +2156,10 @@
 + 
 + 	group--;
 + 	if (group == 0)
@@ -3335,7 +3331,7 @@ index 0000000..f83f84e
 + 			   "2^0", "2^1", "2^2", "2^3", "2^4", "2^5", "2^6",
 + 			   "2^7", "2^8", "2^9", "2^10", "2^11", "2^12", "2^13");
 + 
-+@@ -2213,13 +2217,20 @@
++@@ -2166,13 +2170,20 @@
 + 		seq_printf(seq, "#%-5u: I/O error\n", group);
 + 		return 0;
 + 	}
@@ -3358,7 +3354,7 @@ index 0000000..f83f84e
 + 	for (i = 0; i <= 13; i++)
 + 		seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ?
 + 				sg.info.bb_counters[i] : 0);
-+@@ -3407,23 +3418,68 @@
++@@ -3333,23 +3344,68 @@
 + }
 + 
 + /*
@@ -3386,7 +3382,7 @@ index 0000000..f83f84e
 ++	}
 ++
 ++	if (free != ext4_free_blks_count(sb, gdp)) {
-++		ext4_error(sb, __func__, "on-disk bitmap for group %d"
+++		ext4_error(sb, "on-disk bitmap for group %d"
 ++			"corrupted: %u blocks free in bitmap, %u - in gd\n",
 ++			group, free, ext4_free_blks_count(sb, gdp));
 ++		return -EIO;
@@ -3428,7 +3424,7 @@ index 0000000..f83f84e
 + 	/* all form of preallocation discards first load group,
 + 	 * so the only competing code is preallocation use.
 + 	 * we don't need any locking here
-+@@ -3439,14 +3495,23 @@
++@@ -3365,14 +3421,23 @@
 + 					     &groupnr, &start);
 + 		len = pa->pa_len;
 + 		spin_unlock(&pa->pa_lock);
@@ -3443,7 +3439,7 @@ index 0000000..f83f84e
 + 		count++;
 + 	}
 ++	if (count + skip != grp->bb_prealloc_nr) {
-++		ext4_error(sb, __func__, "lost preallocations: "
+++		ext4_error(sb, "lost preallocations: "
 ++			   "count %d, bb_prealloc_nr %lu, skip %d\n",
 ++			   count, grp->bb_prealloc_nr, skip);
 ++		return -EIO;
@@ -3453,7 +3449,7 @@ index 0000000..f83f84e
 + }
 + 
 + static void ext4_mb_pa_callback(struct rcu_head *head)
-+@@ -3505,6 +3570,7 @@
++@@ -3431,6 +3496,7 @@
 + 	 */
 + 	ext4_lock_group(sb, grp);
 + 	list_del(&pa->pa_group_list);
@@ -3461,7 +3457,7 @@ index 0000000..f83f84e
 + 	ext4_unlock_group(sb, grp);
 + 
 + 	spin_lock(pa->pa_obj_lock);
-+@@ -3596,6 +3662,7 @@
++@@ -3522,6 +3588,7 @@
 + 
 + 	ext4_lock_group(sb, ac->ac_b_ex.fe_group);
 + 	list_add(&pa->pa_group_list, &grp->bb_prealloc_list);
@@ -3469,7 +3465,7 @@ index 0000000..f83f84e
 + 	ext4_unlock_group(sb, ac->ac_b_ex.fe_group);
 + 
 + 	spin_lock(pa->pa_obj_lock);
-+@@ -3657,6 +3724,7 @@
++@@ -3583,6 +3650,7 @@
 + 
 + 	ext4_lock_group(sb, ac->ac_b_ex.fe_group);
 + 	list_add(&pa->pa_group_list, &grp->bb_prealloc_list);
@@ -3477,7 +3473,7 @@ index 0000000..f83f84e
 + 	ext4_unlock_group(sb, ac->ac_b_ex.fe_group);
 + 
 + 	/*
-+@@ -3857,6 +3925,8 @@
++@@ -3783,6 +3851,8 @@
 + 
 + 		spin_unlock(&pa->pa_lock);
 + 
@@ -3486,25 +3482,21 @@ index 0000000..f83f84e
 + 		list_del(&pa->pa_group_list);
 + 		list_add(&pa->u.pa_tmp_list, &list);
 + 	}
-+@@ -3997,7 +4067,7 @@
-+ 		if (err) {
-+ 			ext4_error(sb, __func__, "Error in loading buddy "
-+ 					"information for %u", group);
++@@ -3931,10 +4001,12 @@
++ 			ext4_error(sb, __func__, "Error in reading block "
++ 					"bitmap for %u", group);
++ 			ext4_mb_release_desc(&e4b);
 +-			continue;
 ++			return;
 + 		}
 + 
-+ 		bitmap_bh = ext4_read_block_bitmap(sb, group);
-+@@ -4009,6 +4079,8 @@
-+ 		}
-+ 
 + 		ext4_lock_group(sb, group);
 ++		BUG_ON(e4b.bd_info->bb_prealloc_nr == 0);
 ++		e4b.bd_info->bb_prealloc_nr--;
 + 		list_del(&pa->pa_group_list);
 + 		ext4_mb_release_inode_pa(&e4b, bitmap_bh, pa, ac);
 + 		ext4_unlock_group(sb, group);
-+@@ -4282,6 +4354,7 @@
++@@ -4208,6 +4280,7 @@
 + 		}
 + 		ext4_lock_group(sb, group);
 + 		list_del(&pa->pa_group_list);
@@ -3512,10 +3504,10 @@ index 0000000..f83f84e
 + 		ext4_mb_release_group_pa(&e4b, pa, ac);
 + 		ext4_unlock_group(sb, group);
 + 
-+Index: linux-source-2.6.32/fs/ext4/mballoc.h
++Index: linux-2.6-2.6.32/fs/ext4/mballoc.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/mballoc.h	2012-07-04 15:59:28.906709399 +0200
-++++ linux-source-2.6.32/fs/ext4/mballoc.h	2012-07-05 11:44:39.263808733 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/mballoc.h	2012-08-23 14:43:21.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/mballoc.h	2012-08-23 15:18:52.490809907 +0200
 +@@ -88,7 +88,7 @@
 + /*
 +  * for which requests use 2^N search using buddies
@@ -3525,17 +3517,17 @@ index 0000000..f83f84e
 + 
 + /*
 +  * default group prealloc size 512 blocks
-diff --git a/ldiskfs/kernel_patches/patches/ext4-mballoc-pa_free-mismatch-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-mballoc-pa_free-mismatch-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-mballoc-pa_free-mismatch-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-mballoc-pa_free-mismatch-squeeze.patch
 new file mode 100644
-index 0000000..2984af6
+index 0000000..8dbe81b
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-mballoc-pa_free-mismatch-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-mballoc-pa_free-mismatch-squeeze.patch
 @@ -0,0 +1,111 @@
-+Index: linux-source-2.6.32/fs/ext4/mballoc.c
++Index: linux-2.6-2.6.32/fs/ext4/mballoc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/mballoc.c	2012-07-04 11:11:15.549376801 +0200
-++++ linux-source-2.6.32/fs/ext4/mballoc.c	2012-07-04 11:15:03.525371414 +0200
-+@@ -3646,6 +3646,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/mballoc.c	2012-08-23 15:31:05.201649761 +0200
+++++ linux-2.6-2.6.32/fs/ext4/mballoc.c	2012-08-24 10:14:50.758714300 +0200
++@@ -3572,6 +3572,7 @@
 + 	INIT_LIST_HEAD(&pa->pa_group_list);
 + 	pa->pa_deleted = 0;
 + 	pa->pa_type = MB_INODE_PA;
@@ -3543,7 +3535,7 @@ index 0000000..2984af6
 + 
 + 	mb_debug(1, "new inode pa %p: %llu/%u for %u\n", pa,
 + 			pa->pa_pstart, pa->pa_len, pa->pa_lstart);
-+@@ -3707,6 +3708,7 @@
++@@ -3633,6 +3634,7 @@
 + 	INIT_LIST_HEAD(&pa->pa_group_list);
 + 	pa->pa_deleted = 0;
 + 	pa->pa_type = MB_GROUP_PA;
@@ -3551,7 +3543,7 @@ index 0000000..2984af6
 + 
 + 	mb_debug(1, "new group pa %p: %llu/%u for %u\n", pa,
 + 			pa->pa_pstart, pa->pa_len, pa->pa_lstart);
-+@@ -3769,7 +3771,9 @@
++@@ -3695,7 +3697,9 @@
 + 	int err = 0;
 + 	int free = 0;
 + 
@@ -3561,7 +3553,7 @@ index 0000000..2984af6
 + 	ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit);
 + 	grp_blk_start = pa->pa_pstart - bit;
 + 	BUG_ON(group != e4b->bd_group && pa->pa_len != 0);
-+@@ -3805,19 +3809,27 @@
++@@ -3731,19 +3735,27 @@
 + 		mb_free_blocks(pa->pa_inode, e4b, bit, next - bit);
 + 		bit = next + 1;
 + 	}
@@ -3574,7 +3566,7 @@ index 0000000..2984af6
 ++	/* "free < pa->pa_free" means we maybe double alloc the same blocks,
 ++	 * otherwise maybe leave some free blocks unavailable, no need to BUG.*/
 ++	if ((free > pa->pa_free && !pa->pa_error) || (free < pa->pa_free)) {
-++		ext4_error(sb, __func__, "pa free mismatch: [pa %p] "
+++		ext4_error(sb, "pa free mismatch: [pa %p] "
 ++				"[phy %lu] [logic %lu] [len %u] [free %u] "
 ++				"[error %u] [inode %lu] [freed %u]", pa,
 ++				(unsigned long)pa->pa_pstart,
@@ -3596,7 +3588,7 @@ index 0000000..2984af6
 + 	atomic_add(free, &sbi->s_mb_discarded);
 + 
 + 	return err;
-+@@ -4584,6 +4596,25 @@
++@@ -4509,6 +4521,25 @@
 + 			ac->ac_b_ex.fe_len = 0;
 + 			ar->len = 0;
 + 			ext4_mb_show_ac(ac);
@@ -3607,7 +3599,7 @@ index 0000000..2984af6
 ++				 * been updated or not when fail case. So can
 ++				 * not revert pa_free back, just mark pa_error*/
 ++				pa->pa_error++;
-++				ext4_error(sb, __func__,
+++				ext4_error(sb,
 ++					"Updating bitmap error: [err %d] "
 ++					"[pa %p] [phy %lu] [logic %lu] "
 ++					"[len %u] [free %u] [error %u] "
@@ -3622,10 +3614,10 @@ index 0000000..2984af6
 + 		} else {
 + 			block = ext4_grp_offs_to_block(sb, &ac->ac_b_ex);
 + 			ar->len = ac->ac_b_ex.fe_len;
-+Index: linux-source-2.6.32/fs/ext4/mballoc.h
++Index: linux-2.6-2.6.32/fs/ext4/mballoc.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/mballoc.h	2012-07-03 17:40:00.545378273 +0200
-++++ linux-source-2.6.32/fs/ext4/mballoc.h	2012-07-04 11:15:03.529378041 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/mballoc.h	2012-08-23 15:18:52.490809907 +0200
+++++ linux-2.6-2.6.32/fs/ext4/mballoc.h	2012-08-24 10:14:50.759714287 +0200
 +@@ -20,6 +20,7 @@
 + #include <linux/version.h>
 + #include <linux/blkdev.h>
@@ -3642,17 +3634,17 @@ index 0000000..2984af6
 + 	struct inode		*pa_inode;	/* hack, for history only */
 + };
 + 
-diff --git a/ldiskfs/kernel_patches/patches/ext4-misc-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-misc-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-misc-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-misc-squeeze.patch
 new file mode 100644
-index 0000000..a7e1236
+index 0000000..569e0d6
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-misc-2.6.32-vanilla.patch
-@@ -0,0 +1,255 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++++ b/ldiskfs/kernel_patches/patches/ext4-misc-squeeze.patch
+@@ -0,0 +1,258 @@
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:44:39.251702342 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:44:41.034717694 +0200
-+@@ -1186,6 +1186,9 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-23 15:18:52.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-23 15:31:05.179650036 +0200
++@@ -1055,6 +1055,9 @@
 + 
 + #define NEXT_ORPHAN(inode) EXT4_I(inode)->i_dtime
 + 
@@ -3662,18 +3654,20 @@ index 0000000..a7e1236
 + /*
 +  * Codes for operating systems
 +  */
-+@@ -1631,6 +1634,7 @@
++@@ -1481,6 +1484,9 @@
++ 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);
-+ extern int ext4_trim_fs(struct super_block *, struct fstrim_range *);
 ++extern void ext4_mb_discard_inode_preallocations(struct inode *);
+++
+++
 + /* inode.c */
 + int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
 + 		struct buffer_head *bh, ext4_fsblk_t blocknr);
-+Index: linux-source-2.6.32/fs/ext4/ext4_extents.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4_extents.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4_extents.h	2012-07-05 11:44:25.879199437 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4_extents.h	2012-07-05 11:44:41.034717694 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4_extents.h	2012-08-23 15:00:50.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4_extents.h	2012-08-23 15:31:05.180650023 +0200
 +@@ -58,6 +58,12 @@
 +  */
 + #define EXT_STATS_
@@ -3695,7 +3689,7 @@ index 0000000..a7e1236
 + 
 + #define EXT_FIRST_EXTENT(__hdr__) \
 + 	((struct ext4_extent *) (((char *) (__hdr__)) +		\
-+@@ -239,6 +246,8 @@
++@@ -238,6 +245,8 @@
 + extern int ext4_ext_calc_credits_for_single_extent(struct inode *inode,
 + 						   int num,
 + 						   struct ext4_ext_path *path);
@@ -3704,10 +3698,10 @@ index 0000000..a7e1236
 + extern int ext4_can_extents_be_merged(struct inode *inode,
 + 				      struct ext4_extent *ex1,
 + 				      struct ext4_extent *ex2);
-+Index: linux-source-2.6.32/fs/ext4/ext4_jbd2.c
++Index: linux-2.6-2.6.32/fs/ext4/ext4_jbd2.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4_jbd2.c	2012-07-04 15:59:28.786716592 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4_jbd2.c	2012-07-05 11:44:41.034717694 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4_jbd2.c	2012-08-23 14:43:21.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4_jbd2.c	2012-08-23 15:31:05.180650023 +0200
 +@@ -31,6 +31,7 @@
 + 	}
 + 	return err;
@@ -3721,10 +3715,10 @@ index 0000000..a7e1236
 + 	return err;
 + }
 ++EXPORT_SYMBOL(__ext4_handle_dirty_metadata);
-+Index: linux-source-2.6.32/fs/ext4/ext4_jbd2.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4_jbd2.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4_jbd2.h	2012-07-04 15:59:28.758712620 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4_jbd2.h	2012-07-05 11:44:41.038820625 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4_jbd2.h	2012-08-23 14:43:21.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4_jbd2.h	2012-08-23 15:31:05.182649998 +0200
 +@@ -35,6 +35,8 @@
 + 	(EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)   \
 + 	 ? 27U : 8U)
@@ -3734,11 +3728,11 @@ index 0000000..a7e1236
 + /* Extended attribute operations touch at most two data buffers,
 +  * two bitmap buffers, and two group summaries, in addition to the inode
 +  * and the superblock, which are already accounted for. */
-+Index: linux-source-2.6.32/fs/ext4/extents.c
++Index: linux-2.6-2.6.32/fs/ext4/extents.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/extents.c	2012-07-05 11:44:25.879199437 +0200
-++++ linux-source-2.6.32/fs/ext4/extents.c	2012-07-05 11:44:41.038820625 +0200
-+@@ -2030,6 +2030,55 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/extents.c	2012-08-23 15:00:50.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/extents.c	2012-08-23 15:31:05.184649974 +0200
++@@ -2016,6 +2016,55 @@
 + }
 + 
 + /*
@@ -3794,8 +3788,8 @@ index 0000000..a7e1236
 +  * How many index/leaf blocks need to change/allocate to modify nrblocks?
 +  *
 +  * if nrblocks are fit in a single extent (chunk flag is 1), then
-+@@ -3890,3 +3939,14 @@
-+ #endif
++@@ -3731,3 +3780,14 @@
++ 	return error;
 + }
 + 
 ++EXPORT_SYMBOL(ext4_ext_store_pblock);
@@ -3809,11 +3803,11 @@ index 0000000..a7e1236
 ++EXPORT_SYMBOL(ext4_ext_walk_space);
 ++EXPORT_SYMBOL(ext4_ext_find_extent);
 ++EXPORT_SYMBOL(ext4_ext_drop_refs);
-+Index: linux-source-2.6.32/fs/ext4/inode.c
++Index: linux-2.6-2.6.32/fs/ext4/inode.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/inode.c	2012-07-05 11:44:36.939315785 +0200
-++++ linux-source-2.6.32/fs/ext4/inode.c	2012-07-05 11:44:41.042715759 +0200
-+@@ -5062,6 +5062,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/inode.c	2012-08-23 15:11:13.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/inode.c	2012-08-23 15:31:05.194649848 +0200
++@@ -4957,6 +4957,7 @@
 + 	iget_failed(inode);
 + 	return ERR_PTR(ret);
 + }
@@ -3821,11 +3815,11 @@ index 0000000..a7e1236
 + 
 + static int ext4_inode_blocks_set(handle_t *handle,
 + 				struct ext4_inode *raw_inode,
-+Index: linux-source-2.6.32/fs/ext4/mballoc.c
++Index: linux-2.6-2.6.32/fs/ext4/mballoc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/mballoc.c	2012-07-05 11:44:39.251702342 +0200
-++++ linux-source-2.6.32/fs/ext4/mballoc.c	2012-07-05 11:44:41.042715759 +0200
-+@@ -4094,6 +4094,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/mballoc.c	2012-08-23 15:18:52.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/mballoc.c	2012-08-23 15:31:05.201649761 +0200
++@@ -4020,6 +4020,7 @@
 + 	if (ac)
 + 		kmem_cache_free(ext4_ac_cachep, ac);
 + }
@@ -3833,18 +3827,18 @@ index 0000000..a7e1236
 + 
 + /*
 +  * finds all preallocated spaces and return blocks being freed to them
-+@@ -4888,3 +4889,6 @@
++@@ -4813,3 +4814,6 @@
 + 		kmem_cache_free(ext4_ac_cachep, ac);
 + 	return;
 + }
 ++
 ++EXPORT_SYMBOL(ext4_free_blocks);
 ++
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-05 11:44:36.923210008 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-05 11:44:41.042715759 +0200
-+@@ -129,6 +129,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-23 15:29:22.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-23 15:31:05.208649674 +0200
++@@ -127,6 +127,7 @@
 + 		(EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ?
 + 		 (__u32)le16_to_cpu(bg->bg_itable_unused_hi) << 16 : 0);
 + }
@@ -3852,20 +3846,21 @@ index 0000000..a7e1236
 + 
 + void ext4_block_bitmap_set(struct super_block *sb,
 + 			   struct ext4_group_desc *bg, ext4_fsblk_t blk)
-+@@ -1139,10 +1140,12 @@
++@@ -1082,10 +1083,12 @@
 + 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
-+ 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
-+ 	Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err,
++ 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
++ 	Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err, Opt_resize,
 ++	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
-+ 	Opt_resize, Opt_usrquota, Opt_grpquota, Opt_i_version,
++ 	Opt_usrquota, Opt_grpquota, Opt_i_version,
 + 	Opt_stripe, Opt_delalloc, Opt_nodelalloc,
 + 	Opt_block_validity, Opt_noblock_validity,
-+ 	Opt_inode_readahead_blks, Opt_journal_ioprio,
-++	Opt_mballoc,
-+ 	Opt_discard, Opt_nodiscard,
-+ 	Opt_init_inode_table, Opt_noinit_inode_table,
++-	Opt_inode_readahead_blks, Opt_journal_ioprio
+++	Opt_inode_readahead_blks, Opt_journal_ioprio,
+++	Opt_mballoc
 + };
-+@@ -1195,6 +1198,9 @@
++ 
++ static const match_table_t tokens = {
++@@ -1135,6 +1138,9 @@
 + 	{Opt_noquota, "noquota"},
 + 	{Opt_quota, "quota"},
 + 	{Opt_usrquota, "usrquota"},
@@ -3875,15 +3870,15 @@ index 0000000..a7e1236
 + 	{Opt_barrier, "barrier=%u"},
 + 	{Opt_barrier, "barrier"},
 + 	{Opt_nobarrier, "nobarrier"},
-+@@ -1210,6 +1216,7 @@
++@@ -1150,6 +1156,7 @@
 + 	{Opt_auto_da_alloc, "auto_da_alloc=%u"},
 + 	{Opt_auto_da_alloc, "auto_da_alloc"},
 + 	{Opt_noauto_da_alloc, "noauto_da_alloc"},
 ++	{Opt_mballoc, "mballoc"},
-+ 	{Opt_discard, "discard"},
-+ 	{Opt_nodiscard, "nodiscard"},
 + 	{Opt_err, NULL},
-+@@ -1563,6 +1570,10 @@
++ };
++ 
++@@ -1495,6 +1502,10 @@
 + 			else
 + 				clear_opt(sbi->s_mount_opt, BARRIER);
 + 			break;
@@ -3894,20 +3889,20 @@ index 0000000..a7e1236
 + 		case Opt_ignore:
 + 			break;
 + 		case Opt_resize:
-+@@ -1646,6 +1657,8 @@
-+ 		case Opt_nodiscard:
-+ 			clear_opt(sbi->s_mount_opt, DISCARD);
++@@ -1571,6 +1582,8 @@
++ 			else
++ 				set_opt(sbi->s_mount_opt,NO_AUTO_DA_ALLOC);
 + 			break;
 ++		case Opt_mballoc:
 ++			break;
 + 		default:
 + 			ext4_msg(sb, KERN_ERR,
 + 			       "Unrecognized mount option \"%s\" "
-diff --git a/ldiskfs/kernel_patches/patches/ext4-mmp-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-mmp-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-mmp-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-mmp-squeeze.patch
 new file mode 100644
-index 0000000..6ebb6cf
+index 0000000..f4caddc
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-mmp-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-mmp-squeeze.patch
 @@ -0,0 +1,575 @@
 +Prevent an ext4 filesystem from being mounted multiple times.
 +A sequence number is stored on disk and is periodically updated (every 5
@@ -3928,10 +3923,10 @@ index 0000000..6ebb6cf
 + 4 files changed, 444 insertions(+), 4 deletions(-)
 + create mode 100644 fs/ext4/mmp.c
 +
-+Index: linux-source-2.6.32/fs/ext4/Makefile
++Index: linux-2.6-2.6.32/fs/ext4/Makefile
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/Makefile	2012-07-04 15:59:29.499219891 +0200
-++++ linux-source-2.6.32/fs/ext4/Makefile	2012-07-05 11:44:26.535714680 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/Makefile	2012-08-23 14:43:22.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/Makefile	2012-08-23 15:04:01.492948912 +0200
 +@@ -6,7 +6,8 @@
 + 
 + ext4-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
@@ -3942,11 +3937,11 @@ index 0000000..6ebb6cf
 + 
 + ext4-$(CONFIG_EXT4_FS_XATTR)		+= xattr.o xattr_user.o xattr_trusted.o
 + ext4-$(CONFIG_EXT4_FS_POSIX_ACL)	+= acl.o
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:44:25.879199437 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:44:26.535714680 +0200
-+@@ -963,7 +963,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-23 15:01:02.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-23 15:04:01.495948876 +0200
++@@ -866,7 +866,7 @@
 + 	__le16	s_want_extra_isize; 	/* New inodes should reserve # bytes */
 + 	__le32	s_flags;		/* Miscellaneous flags */
 + 	__le16  s_raid_stride;		/* RAID stride */
@@ -3955,17 +3950,17 @@ index 0000000..6ebb6cf
 + 	__le64  s_mmp_block;            /* Block for multi-mount protection */
 + 	__le32  s_raid_stripe_width;    /* blocks on all data disks (N*stride)*/
 + 	__u8	s_log_groups_per_flex;  /* FLEX_BG group size */
-+@@ -1111,6 +1111,9 @@
++@@ -1013,6 +1013,9 @@
++ 
 + 	/* workqueue for dio unwritten */
 + 	struct workqueue_struct *dio_unwritten_wq;
-+ 
+++
 ++	/* Kernel thread for multiple mount protection */
 ++	struct task_struct *s_mmp_tsk;
-++
-+ 	/* Lazy inode table initialization info */
-+ 	struct ext4_li_request *s_li_request;
 + };
-+@@ -1252,7 +1255,8 @@
++ 
++ static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb)
++@@ -1121,7 +1124,8 @@
 + 					 EXT4_FEATURE_INCOMPAT_META_BG| \
 + 					 EXT4_FEATURE_INCOMPAT_EXTENTS| \
 + 					 EXT4_FEATURE_INCOMPAT_64BIT| \
@@ -3975,9 +3970,9 @@ index 0000000..6ebb6cf
 + #define EXT4_FEATURE_RO_COMPAT_SUPP	(EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER| \
 + 					 EXT4_FEATURE_RO_COMPAT_LARGE_FILE| \
 + 					 EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \
-+@@ -1451,6 +1455,67 @@
-+ };
-+     
++@@ -1303,6 +1307,67 @@
++ extern struct proc_dir_entry *ext4_proc_root;
++ 
 + /*
 ++ * This structure will be used for multiple mount protection. It will be
 ++ * written into the block number saved in the s_mmp_block field in the
@@ -4043,7 +4038,7 @@ index 0000000..6ebb6cf
 +  * Function prototypes
 +  */
 + 
-+@@ -1619,6 +1684,10 @@
++@@ -1465,6 +1530,10 @@
 + 	__attribute__ ((format (printf, 3, 4)));
 + extern void ext4_msg(struct super_block *, const char *, const char *, ...)
 + 	__attribute__ ((format (printf, 3, 4)));
@@ -4054,7 +4049,7 @@ index 0000000..6ebb6cf
 + extern void ext4_grp_locked_error(struct super_block *, ext4_group_t,
 + 				const char *, const char *, ...)
 + 	__attribute__ ((format (printf, 4, 5)));
-+@@ -1901,6 +1970,8 @@
++@@ -1746,6 +1815,8 @@
 + 			     __u64 start_orig, __u64 start_donor,
 + 			     __u64 len, __u64 *moved_len);
 + 
@@ -4063,10 +4058,10 @@ index 0000000..6ebb6cf
 + 
 + /*
 +  * Add new method to test wether block and inode bitmaps are properly
-+Index: linux-source-2.6.32/fs/ext4/mmp.c
++Index: linux-2.6-2.6.32/fs/ext4/mmp.c
 +===================================================================
 +--- /dev/null	1970-01-01 00:00:00.000000000 +0000
-++++ linux-source-2.6.32/fs/ext4/mmp.c	2012-07-05 11:44:26.539712783 +0200
+++++ linux-2.6-2.6.32/fs/ext4/mmp.c	2012-08-23 15:04:01.498948838 +0200
 +@@ -0,0 +1,351 @@
 ++#include <linux/fs.h>
 ++#include <linux/random.h>
@@ -4123,7 +4118,7 @@ index 0000000..6ebb6cf
 ++               }
 ++       }
 ++       if (!*bh) {
-++               ext4_warning(sb, __func__, "Error while reading MMP block %llu",
+++               ext4_warning(sb, "Error while reading MMP block %llu",
 ++                            mmp_block);
 ++               return -EIO;
 ++       }
@@ -4141,8 +4136,8 @@ index 0000000..6ebb6cf
 ++void __dump_mmp_msg(struct super_block *sb, struct mmp_struct *mmp,
 ++                   const char *function, const char *msg)
 ++{
-++       ext4_warning(sb, function, msg);
-++       ext4_warning(sb, function,
+++       __ext4_warning(sb, function, msg);
+++       __ext4_warning(sb, function,
 ++                      "MMP failure info: last update time: %llu, last update "
 ++                      "node: %s, last update device: %s\n",
 ++                      (long long unsigned int) le64_to_cpu(mmp->mmp_time),
@@ -4197,20 +4192,20 @@ index 0000000..6ebb6cf
 ++                */
 ++               if (retval) {
 ++                       if ((failed_writes % 60) == 0)
-++                               ext4_error(sb, __func__, "Error writing to MMP block");
+++                               ext4_error(sb, "Error writing to MMP block");
 ++                       failed_writes++;
 ++               }
 ++
 ++               if (!(le32_to_cpu(es->s_feature_incompat) &
 ++                   EXT4_FEATURE_INCOMPAT_MMP)) {
-++                       ext4_warning(sb, __func__, "kmmpd being stopped since MMP feature"
+++                       ext4_warning(sb, "kmmpd being stopped since MMP feature"
 ++                                    " has been disabled.");
 ++                       EXT4_SB(sb)->s_mmp_tsk = NULL;
 ++                       goto failed;
 ++               }
 ++
 ++               if (sb->s_flags & MS_RDONLY) {
-++                       ext4_warning(sb, __func__, "kmmpd being stopped since filesystem "
+++                       ext4_warning(sb, "kmmpd being stopped since filesystem "
 ++                                    "has been remounted as readonly.");
 ++                       EXT4_SB(sb)->s_mmp_tsk = NULL;
 ++                       goto failed;
@@ -4233,7 +4228,7 @@ index 0000000..6ebb6cf
 ++
 ++                       retval = read_mmp_block(sb, &bh_check, mmp_block);
 ++                       if (retval) {
-++                               ext4_error(sb, __func__, "error reading MMP data: %d",
+++                               ext4_error(sb, "error reading MMP data: %d",
 ++                                          retval);
 ++
 ++                               EXT4_SB(sb)->s_mmp_tsk = NULL;
@@ -4248,7 +4243,7 @@ index 0000000..6ebb6cf
 ++                                            "Error while updating MMP info. "
 ++                                            "The filesystem seems to have been"
 ++                                            " multiply mounted.");
-++                               ext4_error(sb, __func__, "abort");
+++                               ext4_error(sb, "abort");
 ++                               goto failed;
 ++                       }
 ++                       put_bh(bh_check);
@@ -4310,7 +4305,7 @@ index 0000000..6ebb6cf
 ++
 ++       if (mmp_block < le32_to_cpu(es->s_first_data_block) ||
 ++           mmp_block >= ext4_blocks_count(es)) {
-++               ext4_warning(sb, __func__, "Invalid MMP block in superblock");
+++               ext4_warning(sb, "Invalid MMP block in superblock");
 ++               goto failed;
 ++       }
 ++
@@ -4344,11 +4339,11 @@ index 0000000..6ebb6cf
 ++
 ++       /* Print MMP interval if more than 20 secs. */
 ++       if (wait_time > EXT4_MMP_MIN_CHECK_INTERVAL * 4)
-++               ext4_warning(sb, __func__, "MMP interval %u higher than expected, please"
+++               ext4_warning(sb, "MMP interval %u higher than expected, please"
 ++                            " wait.\n", wait_time * 2);
 ++
 ++       if (schedule_timeout_interruptible(HZ * wait_time) != 0) {
-++               ext4_warning(sb, __func__, "MMP startup interrupted, failing mount\n");
+++               ext4_warning(sb, "MMP startup interrupted, failing mount\n");
 ++               goto failed;
 ++       }
 ++
@@ -4376,7 +4371,7 @@ index 0000000..6ebb6cf
 ++        * wait for MMP interval and check mmp_seq.
 ++        */
 ++       if (schedule_timeout_interruptible(HZ * wait_time) != 0) {
-++               ext4_warning(sb, __func__, "MMP startup interrupted, failing mount\n");
+++               ext4_warning(sb, "MMP startup interrupted, failing mount\n");
 ++               goto failed;
 ++       }
 ++
@@ -4392,7 +4387,7 @@ index 0000000..6ebb6cf
 ++
 ++       mmpd_data = kmalloc(sizeof(struct mmpd_data), GFP_KERNEL);
 ++       if (!mmpd_data) {
-++               ext4_warning(sb, __func__, "not enough memory for mmpd_data");
+++               ext4_warning(sb, "not enough memory for mmpd_data");
 ++               goto failed;
 ++       }
 ++       mmpd_data->sb = sb;
@@ -4407,7 +4402,7 @@ index 0000000..6ebb6cf
 ++       if (IS_ERR(EXT4_SB(sb)->s_mmp_tsk)) {
 ++               EXT4_SB(sb)->s_mmp_tsk = NULL;
 ++               kfree(mmpd_data);
-++               ext4_warning(sb, __func__, "Unable to create kmmpd thread for %s.",
+++               ext4_warning(sb, "Unable to create kmmpd thread for %s.",
 ++                            sb->s_id);
 ++               goto failed;
 ++       }
@@ -4419,10 +4414,10 @@ index 0000000..6ebb6cf
 ++       return 1;
 ++}
 ++
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-05 11:44:25.883210089 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-05 11:44:26.539712783 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-23 15:00:24.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-23 15:04:01.503948776 +0200
 +@@ -40,6 +40,8 @@
 + #include <linux/log2.h>
 + #include <linux/crc16.h>
@@ -4432,7 +4427,7 @@ index 0000000..6ebb6cf
 + 
 + #include "ext4.h"
 + #include "ext4_jbd2.h"
-+@@ -703,6 +705,8 @@
++@@ -662,6 +664,8 @@
 + 		invalidate_bdev(sbi->journal_bdev);
 + 		ext4_blkdev_remove(sbi);
 + 	}
@@ -4441,7 +4436,7 @@ index 0000000..6ebb6cf
 + 	sb->s_fs_info = NULL;
 + 	/*
 + 	 * Now that we are completely done shutting down the
-+@@ -2785,6 +2789,10 @@
++@@ -2714,6 +2718,10 @@
 + 	needs_recovery = (es->s_last_orphan != 0 ||
 + 			  EXT4_HAS_INCOMPAT_FEATURE(sb,
 + 				    EXT4_FEATURE_INCOMPAT_RECOVER));
@@ -4452,16 +4447,16 @@ index 0000000..6ebb6cf
 + 
 + 	/*
 + 	 * The first inode we look at is the journal inode.  Don't try
-+@@ -3017,6 +3025,8 @@
-+ 		else
-+ 			kfree(sbi->s_flex_groups);
-+ 	}
-++	if (sbi->s_mmp_tsk)
-++		kthread_stop(sbi->s_mmp_tsk);
-+ 	percpu_counter_destroy(&sbi->s_freeblocks_counter);
++@@ -2951,6 +2959,8 @@
 + 	percpu_counter_destroy(&sbi->s_freeinodes_counter);
 + 	percpu_counter_destroy(&sbi->s_dirs_counter);
-+@@ -3529,7 +3539,7 @@
++ 	percpu_counter_destroy(&sbi->s_dirtyblocks_counter);
+++	if (sbi->s_mmp_tsk)
+++		kthread_stop(sbi->s_mmp_tsk);
++ failed_mount2:
++ 	for (i = 0; i < db_count; i++)
++ 		brelse(sbi->s_group_desc[i]);
++@@ -3460,7 +3470,7 @@
 + 	struct ext4_mount_options old_opts;
 + 	ext4_group_t g;
 + 	unsigned int journal_ioprio = DEFAULT_JOURNAL_IOPRIO;
@@ -4470,7 +4465,7 @@ index 0000000..6ebb6cf
 + #ifdef CONFIG_QUOTA
 + 	int i;
 + #endif
-+@@ -3651,6 +3661,13 @@
++@@ -3582,6 +3592,13 @@
 + 				goto restore_opts;
 + 			if (!ext4_setup_super(sb, es, 0))
 + 				sb->s_flags &= ~MS_RDONLY;
@@ -4484,17 +4479,17 @@ index 0000000..6ebb6cf
 + 		}
 + 	}
 + 	ext4_setup_system_zone(sb);
-diff --git a/ldiskfs/kernel_patches/patches/ext4-nlink-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-nlink-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-nlink-2.6-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-nlink-2.6-squeeze.patch
 new file mode 100644
-index 0000000..07d4721
+index 0000000..73eefda
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-nlink-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-nlink-2.6-squeeze.patch
 @@ -0,0 +1,16 @@
-+Index: linux-source-2.6.32/fs/ext4/namei.c
++Index: linux-2.6-2.6.32/fs/ext4/namei.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-06-28 12:08:58.217663806 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-06-28 12:09:27.373665875 +0200
-+@@ -1742,9 +1742,8 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/namei.c	2012-08-23 14:51:32.598311384 +0200
+++++ linux-2.6-2.6.32/fs/ext4/namei.c	2012-08-23 14:51:53.087055239 +0200
++@@ -1746,9 +1746,8 @@
 +  */
 + static void ext4_dec_count(handle_t *handle, struct inode *inode)
 + {
@@ -4506,17 +4501,17 @@ index 0000000..07d4721
 + }
 + 
 + 
-diff --git a/ldiskfs/kernel_patches/patches/ext4-nocmtime-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-nocmtime-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-nocmtime-2.6-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-nocmtime-2.6-squeeze.patch
 new file mode 100644
-index 0000000..fa66ccd
+index 0000000..56fecfe
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-nocmtime-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-nocmtime-2.6-squeeze.patch
 @@ -0,0 +1,27 @@
-+Index: linux-source-2.6.32/fs/ext4/xattr.c
++Index: linux-2.6-2.6.32/fs/ext4/xattr.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/xattr.c	2012-06-28 12:11:24.117664822 +0200
-++++ linux-source-2.6.32/fs/ext4/xattr.c	2012-06-28 12:11:31.053665768 +0200
-+@@ -1347,7 +1347,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/xattr.c	2012-08-24 10:27:04.535540828 +0200
+++++ linux-2.6-2.6.32/fs/ext4/xattr.c	2012-08-24 10:28:21.649576717 +0200
++@@ -1346,7 +1346,7 @@
 + 	}
 + 	if (!error) {
 + 		ext4_xattr_update_super_block(handle, inode->i_sb);
@@ -4524,12 +4519,12 @@ index 0000000..fa66ccd
 ++		if (!IS_NOCMTIME(inode) && !(flags & XATTR_NO_CTIME))
 + 			inode->i_ctime = ext4_current_time(inode);
 + 		if (!value)
-+ 			ext4_clear_inode_state(inode, EXT4_STATE_NO_EXPAND);
-+Index: linux-source-2.6.32/fs/ext4/namei.c
++ 			EXT4_I(inode)->i_state &= ~EXT4_STATE_NO_EXPAND;
++Index: linux-2.6-2.6.32/fs/ext4/namei.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-06-28 12:11:16.365664904 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-06-28 12:11:31.057668333 +0200
-+@@ -1444,7 +1444,8 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/namei.c	2012-08-24 10:23:40.798087896 +0200
+++++ linux-2.6-2.6.32/fs/ext4/namei.c	2012-08-24 10:28:21.653576667 +0200
++@@ -1451,7 +1451,8 @@
 + 	 * happen is that the times are slightly out of date
 + 	 * and/or different from the directory change time.
 + 	 */
@@ -4539,17 +4534,17 @@ index 0000000..fa66ccd
 + 	ext4_update_dx_flag(dir);
 + 	dir->i_version++;
 + 	ext4_mark_inode_dirty(handle, dir);
-diff --git a/ldiskfs/kernel_patches/patches/ext4-osd-iam-exports-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-osd-iam-exports-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-osd-iam-exports-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-osd-iam-exports-squeeze.patch
 new file mode 100644
-index 0000000..c680178
+index 0000000..d1f36a3
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-osd-iam-exports-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-osd-iam-exports-squeeze.patch
 @@ -0,0 +1,68 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:44:49.879708890 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:44:51.610705754 +0200
-+@@ -1705,6 +1705,9 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-24 09:03:21.905332346 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-24 09:04:04.915794590 +0200
++@@ -1555,6 +1555,9 @@
 + #define ll_ext4_find_entry(inode, dentry, res_dir) ext4_find_entry(inode, &(dentry)->d_name, res_dir)
 + extern int ext4_add_dot_dotdot(handle_t *handle, struct inode *dir,
 + 			       struct inode *inode);
@@ -4559,10 +4554,10 @@ index 0000000..c680178
 + 
 + /* resize.c */
 + extern int ext4_group_add(struct super_block *sb,
-+Index: linux-source-2.6.32/fs/ext4/hash.c
++Index: linux-2.6-2.6.32/fs/ext4/hash.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/hash.c	2012-07-04 15:59:28.103698041 +0200
-++++ linux-source-2.6.32/fs/ext4/hash.c	2012-07-05 11:44:51.610705754 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/hash.c	2012-08-24 09:03:17.686385091 +0200
+++++ linux-2.6-2.6.32/fs/ext4/hash.c	2012-08-24 09:04:04.916794577 +0200
 +@@ -9,6 +9,7 @@
 +  * License.
 +  */
@@ -4576,10 +4571,10 @@ index 0000000..c680178
 + 	return 0;
 + }
 ++EXPORT_SYMBOL(ext4fs_dirhash);
-+Index: linux-source-2.6.32/fs/ext4/namei.c
++Index: linux-2.6-2.6.32/fs/ext4/namei.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-07-05 11:44:49.879708890 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-07-05 11:44:51.610705754 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/namei.c	2012-08-24 09:03:21.907332322 +0200
+++++ linux-2.6-2.6.32/fs/ext4/namei.c	2012-08-24 09:04:04.919794538 +0200
 +@@ -49,9 +49,9 @@
 + #define NAMEI_RA_SIZE	     (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS)
 + #define NAMEI_RA_INDEX(c,b)  (((c) * NAMEI_RA_BLOCKS) + (b))
@@ -4601,11 +4596,11 @@ index 0000000..c680178
 + 
 + #ifndef assert
 + #define assert(test) J_ASSERT(test)
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-05 11:44:47.986701517 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-05 11:44:51.610705754 +0200
-+@@ -450,6 +450,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-24 09:03:17.686385091 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-24 09:04:04.923794490 +0200
++@@ -411,6 +411,7 @@
 + 
 + 	ext4_handle_error(sb);
 + }
@@ -4613,17 +4608,17 @@ index 0000000..c680178
 + 
 + /*
 +  * ext4_abort is a much stronger failure handler than ext4_error.  The
-diff --git a/ldiskfs/kernel_patches/patches/ext4-osd-iop-common-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-osd-iop-common-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-osd-iop-common-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-osd-iop-common-squeeze.patch
 new file mode 100644
-index 0000000..77fca89
+index 0000000..03b1558
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-osd-iop-common-2.6.32-vanilla.patch
-@@ -0,0 +1,229 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++++ b/ldiskfs/kernel_patches/patches/ext4-osd-iop-common-squeeze.patch
+@@ -0,0 +1,223 @@
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:44:47.986701517 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:44:49.879708890 +0200
-+@@ -1692,6 +1692,19 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-24 09:03:19.077367701 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-24 09:03:21.905332346 +0200
++@@ -1542,6 +1542,19 @@
 + extern int ext4_orphan_del(handle_t *, struct inode *);
 + extern int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
 + 				__u32 start_minor_hash, __u32 *next_hash);
@@ -4643,10 +4638,10 @@ index 0000000..77fca89
 + 
 + /* resize.c */
 + extern int ext4_group_add(struct super_block *sb,
-+Index: linux-source-2.6.32/fs/ext4/namei.c
++Index: linux-2.6-2.6.32/fs/ext4/namei.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-07-05 11:44:47.986701517 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-07-05 11:44:49.879708890 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/namei.c	2012-08-24 09:03:19.077367701 +0200
+++++ linux-2.6-2.6.32/fs/ext4/namei.c	2012-08-24 09:03:21.907332322 +0200
 +@@ -24,6 +24,7 @@
 +  *	Theodore Ts'o, 2002
 +  */
@@ -4655,7 +4650,7 @@ index 0000000..77fca89
 + #include <linux/fs.h>
 + #include <linux/pagemap.h>
 + #include <linux/jbd2.h>
-+@@ -901,9 +902,9 @@
++@@ -900,9 +901,9 @@
 +  * The returned buffer_head has ->b_count elevated.  The caller is expected
 +  * to brelse() it when appropriate.
 +  */
@@ -4668,7 +4663,7 @@ index 0000000..77fca89
 + {
 + 	struct super_block *sb;
 + 	struct buffer_head *bh_use[NAMEI_RA_SIZE];
-+@@ -1010,6 +1011,7 @@
++@@ -1009,6 +1010,7 @@
 + 		brelse(bh_use[ra_ptr]);
 + 	return ret;
 + }
@@ -4676,7 +4671,7 @@ index 0000000..77fca89
 + 
 + static struct buffer_head * ext4_dx_find_entry(struct inode *dir, const struct qstr *d_name,
 + 		       struct ext4_dir_entry_2 **res_dir, int *err)
-+@@ -1533,8 +1535,8 @@
++@@ -1539,8 +1541,8 @@
 +  * may not sleep between calling this and putting something into
 +  * the entry, as someone else might have used it while you slept.
 +  */
@@ -4688,29 +4683,23 @@ index 0000000..77fca89
 + 	struct inode *dir = dentry->d_parent->d_inode;
 + 	struct buffer_head *bh;
 +@@ -1585,6 +1587,7 @@
-+ 		ext4_set_inode_state(inode, EXT4_STATE_NEWENTRY);
-+ 	return retval;
++ 	de->rec_len = ext4_rec_len_to_disk(blocksize, blocksize);
++ 	return add_dirent_to_buf(handle, dentry, inode, de, bh);
 + }
 ++EXPORT_SYMBOL(ext4_add_entry);
 + 
 + /*
 +  * Returns 0 for success, or a negative error value
-+@@ -1725,10 +1728,10 @@
++@@ -1728,7 +1731,7 @@
 +  * ext4_delete_entry deletes a directory entry by merging it with the
 +  * previous entry
 +  */
 +-static int ext4_delete_entry(handle_t *handle,
-+-			     struct inode *dir,
-+-			     struct ext4_dir_entry_2 *de_del,
-+-			     struct buffer_head *bh)
 ++int ext4_delete_entry(handle_t *handle,
-++		      struct inode *dir,
-++		      struct ext4_dir_entry_2 *de_del,
-++		      struct buffer_head *bh)
-+ {
-+ 	struct ext4_dir_entry_2 *de, *pde;
-+ 	unsigned int blocksize = dir->i_sb->s_blocksize;
-+@@ -1763,7 +1766,7 @@
++ 			     struct inode *dir,
++ 			     struct ext4_dir_entry_2 *de_del,
++ 			     struct buffer_head *bh)
++@@ -1766,7 +1769,7 @@
 + 	}
 + 	return -ENOENT;
 + }
@@ -4719,7 +4708,7 @@ index 0000000..77fca89
 + /*
 +  * DIR_NLINK feature is set if 1) nlinks > EXT4_LINK_MAX or 2) nlinks == 2,
 +  * since this indicates that nlinks count was previously 1.
-+@@ -1827,6 +1830,27 @@
++@@ -1830,6 +1833,27 @@
 + 	return inum;
 + }
 + 
@@ -4747,13 +4736,13 @@ index 0000000..77fca89
 + /*
 +  * By the time this is called, we already have created
 +  * the directory cache entry for the new file, but it
-+@@ -1903,40 +1927,33 @@
++@@ -1906,40 +1930,32 @@
 + 	return err;
 + }
 + 
 +-static int ext4_mkdir(struct inode *dir, struct dentry *dentry, int mode)
 ++/* Initialize @inode as a subdirectory of @dir, and add the
-++ * "." and ".." entries into the first directory block. */
+++* "." and ".." entries into the first directory block. */
 ++int ext4_add_dot_dotdot(handle_t *handle, struct inode * dir,
 ++			struct inode *inode)
 + {
@@ -4765,15 +4754,15 @@ index 0000000..77fca89
 ++	struct ext4_dir_entry_2 * de;
 + 	unsigned int blocksize = dir->i_sb->s_blocksize;
 +-	int err, retries = 0;
-+-
-+-	if (EXT4_DIR_LINK_MAX(dir))
-+-		return -EMLINK;
 ++	int err = 0;
 + 
++-	if (EXT4_DIR_LINK_MAX(dir))
++-		return -EMLINK;
++-
 +-retry:
 +-	handle = ext4_journal_start(dir, EXT4_DATA_TRANS_BLOCKS(dir->i_sb) +
 +-					EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3 +
-+-					EXT4_MAXQUOTAS_INIT_BLOCKS(dir->i_sb));
++-					2*EXT4_QUOTA_INIT_BLOCKS(dir->i_sb));
 + 	if (IS_ERR(handle))
 + 		return PTR_ERR(handle);
 + 
@@ -4785,7 +4774,7 @@ index 0000000..77fca89
 +-	err = PTR_ERR(inode);
 +-	if (IS_ERR(inode))
 +-		goto out_stop;
-+ 
++-
 + 	inode->i_op = &ext4_dir_inode_operations;
 + 	inode->i_fop = &ext4_dir_operations;
 + 	inode->i_size = EXT4_I(inode)->i_disksize = inode->i_sb->s_blocksize;
@@ -4801,7 +4790,7 @@ index 0000000..77fca89
 + 	BUFFER_TRACE(dir_block, "get_write_access");
 + 	ext4_journal_get_write_access(handle, dir_block);
 + 	de = (struct ext4_dir_entry_2 *) dir_block->b_data;
-+@@ -1958,9 +1975,45 @@
++@@ -1961,9 +1977,45 @@
 + 	ext4_handle_dirty_metadata(handle, dir, dir_block);
 + 	brelse(dir_block);
 + 	ext4_mark_inode_dirty(handle, inode);
@@ -4848,16 +4837,16 @@ index 0000000..77fca89
 + 		clear_nlink(inode);
 + 		unlock_new_inode(inode);
 + 		ext4_mark_inode_dirty(handle, inode);
-diff --git a/ldiskfs/kernel_patches/patches/ext4-pdir-fix-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-pdir-fix-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-pdir-fix-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-pdir-fix-squeeze.patch
 new file mode 100644
-index 0000000..ddfb53b
+index 0000000..5db5d83
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-pdir-fix-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-pdir-fix-squeeze.patch
 @@ -0,0 +1,62 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:44:44.644216399 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:44:47.986701517 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-23 15:35:14.903528057 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-23 15:37:57.475495628 +0200
 +@@ -16,6 +16,7 @@
 + #ifndef _EXT4_H
 + #define _EXT4_H
@@ -4866,9 +4855,9 @@ index 0000000..ddfb53b
 + #include <linux/types.h>
 + #include <linux/blkdev.h>
 + #include <linux/magic.h>
-+@@ -701,6 +702,10 @@
-+ 	__u32	i_dtime;
++@@ -619,6 +620,10 @@
 + 	ext4_fsblk_t	i_file_acl;
++ 	__u32	i_dtime;
 + 
 ++	/* following fields for parallel directory operations -bzzz */
 ++	struct dynlock   i_htree_lock;
@@ -4877,10 +4866,10 @@ index 0000000..ddfb53b
 + 	/*
 + 	 * i_block_group is the number of the block group which contains
 + 	 * this file's inode.  Constant across the lifetime of the inode,
-+Index: linux-source-2.6.32/fs/ext4/namei.c
++Index: linux-2.6-2.6.32/fs/ext4/namei.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-07-05 11:44:44.644216399 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-07-05 11:44:47.986701517 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/namei.c	2012-08-23 15:35:14.880528346 +0200
+++++ linux-2.6-2.6.32/fs/ext4/namei.c	2012-08-23 15:37:57.477495604 +0200
 +@@ -53,6 +53,11 @@
 + 					ext4_lblk_t *block, int *err)
 + {
@@ -4903,11 +4892,11 @@ index 0000000..ddfb53b
 + 	return bh;
 + }
 + 
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-05 11:44:46.859215944 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-05 11:44:47.986701517 +0200
-+@@ -740,6 +740,8 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-23 15:37:33.354797179 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-23 15:37:57.500495313 +0200
++@@ -699,6 +699,8 @@
 + 
 + 	ei->vfs_inode.i_version = 1;
 + 	ei->vfs_inode.i_data.writeback_index = 0;
@@ -4916,17 +4905,17 @@ index 0000000..ddfb53b
 + 	memset(&ei->i_cached_extent, 0, sizeof(struct ext4_ext_cache));
 + 	INIT_LIST_HEAD(&ei->i_prealloc_list);
 + 	spin_lock_init(&ei->i_prealloc_lock);
-diff --git a/ldiskfs/kernel_patches/patches/ext4-prealloc-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-prealloc-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-prealloc-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-prealloc-squeeze.patch
 new file mode 100644
-index 0000000..0a311e7
+index 0000000..7507822
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-prealloc-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-prealloc-squeeze.patch
 @@ -0,0 +1,381 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:44:34.954703493 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:44:36.923210008 +0200
-+@@ -1070,11 +1070,14 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-23 15:08:50.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-23 15:11:13.263551037 +0200
++@@ -973,11 +973,14 @@
 + 
 + 	/* tunables */
 + 	unsigned long s_stripe;
@@ -4942,12 +4931,12 @@ index 0000000..0a311e7
 + 	unsigned int s_mb_group_prealloc;
 + 	unsigned int s_max_writeback_mb_bump;
 + 	/* where last allocation was done - for stream allocation */
-+Index: linux-source-2.6.32/fs/ext4/mballoc.c
++Index: linux-2.6-2.6.32/fs/ext4/mballoc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/mballoc.c	2012-07-05 11:44:25.879199437 +0200
-++++ linux-source-2.6.32/fs/ext4/mballoc.c	2012-07-05 11:44:36.923210008 +0200
-+@@ -1821,6 +1821,25 @@
-+ 	ext4_mb_check_limits(ac, e4b, 1);
++--- linux-2.6-2.6.32.orig/fs/ext4/mballoc.c	2012-08-23 14:43:22.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/mballoc.c	2012-08-23 15:11:13.278550850 +0200
++@@ -1823,6 +1823,25 @@
++ 	}
 + }
 + 
 ++static void ext4_mb_prealloc_table_add(struct ext4_sb_info *sbi, int value)
@@ -4969,10 +4958,10 @@ index 0000000..0a311e7
 ++	}
 ++}
 ++
-+ /*
-+  * This is a special case for storages like raid5
-+  * we try to find stripe-aligned chunks for stripe-size requests
-+@@ -2220,6 +2239,80 @@
++ static int ext4_mb_good_group(struct ext4_allocation_context *ac,
++ 				ext4_group_t group, int cr)
++ {
++@@ -2173,6 +2192,80 @@
 + 	.show   = ext4_mb_seq_groups_show,
 + };
 + 
@@ -5053,7 +5042,7 @@ index 0000000..0a311e7
 + static int ext4_mb_seq_groups_open(struct inode *inode, struct file *file)
 + {
 + 	struct super_block *sb = PDE(inode)->data;
-+@@ -2459,12 +2552,56 @@
++@@ -2411,12 +2504,56 @@
 + 	sbi->s_mb_max_to_scan = MB_DEFAULT_MAX_TO_SCAN;
 + 	sbi->s_mb_min_to_scan = MB_DEFAULT_MIN_TO_SCAN;
 + 	sbi->s_mb_stats = MB_DEFAULT_STATS;
@@ -5112,7 +5101,7 @@ index 0000000..0a311e7
 + 		kfree(sbi->s_mb_offsets);
 + 		kfree(sbi->s_mb_maxs);
 + 		return -ENOMEM;
-+@@ -2478,9 +2615,18 @@
++@@ -2430,9 +2567,18 @@
 + 		spin_lock_init(&lg->lg_prealloc_lock);
 + 	}
 + 
@@ -5132,7 +5121,7 @@ index 0000000..0a311e7
 + 
 + 	if (sbi->s_journal)
 + 		sbi->s_journal->j_commit_callback = release_blocks_on_commit;
-+@@ -2560,8 +2706,10 @@
++@@ -2512,8 +2658,10 @@
 + 	}
 + 
 + 	free_percpu(sbi->s_locality_groups);
@@ -5144,7 +5133,7 @@ index 0000000..0a311e7
 + 
 + 	return 0;
 + }
-+@@ -2861,11 +3009,12 @@
++@@ -2805,11 +2953,12 @@
 + ext4_mb_normalize_request(struct ext4_allocation_context *ac,
 + 				struct ext4_allocation_request *ar)
 + {
@@ -5159,7 +5148,7 @@ index 0000000..0a311e7
 + 	struct ext4_prealloc_space *pa;
 + 
 + 	/* do normalize only data requests, metadata requests
-+@@ -2895,49 +3044,35 @@
++@@ -2839,49 +2988,35 @@
 + 	size = size << bsbits;
 + 	if (size < i_size_read(ac->ac_inode))
 + 		size = i_size_read(ac->ac_inode);
@@ -5234,7 +5223,7 @@ index 0000000..0a311e7
 + 
 + 	/* don't cover already allocated blocks in selected range */
 + 	if (ar->pleft && start <= ar->lleft) {
-+@@ -3009,7 +3144,6 @@
++@@ -2953,7 +3088,6 @@
 + 	}
 + 	BUG_ON(start + size <= ac->ac_o_ex.fe_logical &&
 + 			start > ac->ac_o_ex.fe_logical);
@@ -5242,11 +5231,11 @@ index 0000000..0a311e7
 + 
 + 	/* now prepare goal request */
 + 
-+@@ -3995,11 +4129,19 @@
++@@ -3921,11 +4055,19 @@
 + 
 + 	/* don't use group allocation for large files */
 + 	size = max(size, isize);
-+-	if (size > sbi->s_mb_stream_request) {
++-	if (size >= sbi->s_mb_stream_request) {
 ++	if ((ac->ac_o_ex.fe_len >= sbi->s_mb_small_req) ||
 ++	    (size >= sbi->s_mb_large_req)) {
 + 		ac->ac_flags |= EXT4_MB_STREAM_ALLOC;
@@ -5263,11 +5252,11 @@ index 0000000..0a311e7
 + 	BUG_ON(ac->ac_lg != NULL);
 + 	/*
 + 	 * locality group prealloc space are per cpu. The reason for having
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-05 11:44:31.991217543 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-05 11:44:36.923210008 +0200
-+@@ -2283,7 +2283,8 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-23 15:05:04.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-23 15:11:13.283550788 +0200
++@@ -2209,7 +2209,8 @@
 + EXT4_RW_ATTR_SBI_UI(mb_max_to_scan, s_mb_max_to_scan);
 + EXT4_RW_ATTR_SBI_UI(mb_min_to_scan, s_mb_min_to_scan);
 + EXT4_RW_ATTR_SBI_UI(mb_order2_req, s_mb_order2_reqs);
@@ -5277,7 +5266,7 @@ index 0000000..0a311e7
 + EXT4_RW_ATTR_SBI_UI(mb_group_prealloc, s_mb_group_prealloc);
 + EXT4_RW_ATTR_SBI_UI(max_writeback_mb_bump, s_max_writeback_mb_bump);
 + 
-+@@ -2298,7 +2299,8 @@
++@@ -2224,7 +2225,8 @@
 + 	ATTR_LIST(mb_max_to_scan),
 + 	ATTR_LIST(mb_min_to_scan),
 + 	ATTR_LIST(mb_order2_req),
@@ -5287,11 +5276,11 @@ index 0000000..0a311e7
 + 	ATTR_LIST(mb_group_prealloc),
 + 	ATTR_LIST(max_writeback_mb_bump),
 + 	NULL,
-+Index: linux-source-2.6.32/fs/ext4/inode.c
++Index: linux-2.6-2.6.32/fs/ext4/inode.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/inode.c	2012-07-05 11:44:25.210698050 +0200
-++++ linux-source-2.6.32/fs/ext4/inode.c	2012-07-05 11:44:36.939315785 +0200
-+@@ -2884,6 +2884,11 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/inode.c	2012-08-23 15:01:02.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/inode.c	2012-08-23 15:11:13.267550988 +0200
++@@ -2836,6 +2836,11 @@
 + 	if (unlikely(sbi->s_mount_flags & EXT4_MF_FS_ABORTED))
 + 		return -EROFS;
 + 
@@ -5303,38 +5292,39 @@ index 0000000..0a311e7
 + 	if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
 + 		range_whole = 1;
 + 
-diff --git a/ldiskfs/kernel_patches/patches/ext4-print-inum-in-htree-warning-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-print-inum-in-htree-warning-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-print-inum-in-htree-warning-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-print-inum-in-htree-warning-squeeze.patch
 new file mode 100644
-index 0000000..0c3aee0
+index 0000000..5cd3f57
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-print-inum-in-htree-warning-2.6.32-vanilla.patch
-@@ -0,0 +1,15 @@
-+Index: linux-source-2.6.32/fs/ext4/namei.c
-+===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-06-28 12:10:03.433668774 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-06-28 12:10:09.617666134 +0200
-+@@ -395,8 +395,8 @@
++++ b/ldiskfs/kernel_patches/patches/ext4-print-inum-in-htree-warning-squeeze.patch
+@@ -0,0 +1,16 @@
++diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
++index 703f341..93c3109 100644
++--- a/fs/ext4/namei.c
+++++ b/fs/ext4/namei.c
++@@ -394,9 +394,8 @@ dx_probe(const struct qstr *d_name, struct inode *dir,
++ 	if (root->info.hash_version != DX_HASH_TEA &&
 + 	    root->info.hash_version != DX_HASH_HALF_MD4 &&
 + 	    root->info.hash_version != DX_HASH_LEGACY) {
-+ 		ext4_warning(dir->i_sb, __func__,
++-		ext4_warning(dir->i_sb, __func__,
 +-			     "Unrecognised inode hash code %d",
 +-			     root->info.hash_version);
-++			     "Unrecognised inode hash code %d for directory "
-++                            "#%lu", root->info.hash_version, dir->i_ino);
+++		ext4_warning(dir->i_sb, "Unrecognised inode hash code %d for directory "
+++			     "#%lu", root->info.hash_version, dir->i_ino);
 + 		brelse(bh);
 + 		*err = ERR_BAD_DX_DIR;
 + 		goto fail;
-diff --git a/ldiskfs/kernel_patches/patches/ext4-remove-cond_resched-calls-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-remove-cond_resched-calls-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-remove-cond_resched-calls-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-remove-cond_resched-calls-squeeze.patch
 new file mode 100644
-index 0000000..204f59c
+index 0000000..641a78e
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-remove-cond_resched-calls-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-remove-cond_resched-calls-squeeze.patch
 @@ -0,0 +1,29 @@
-+Index: linux-source-2.6.32/fs/ext4/ialloc.c
++Index: linux-2.6-2.6.32/fs/ext4/ialloc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ialloc.c	2012-06-28 12:09:19.417666703 +0200
-++++ linux-source-2.6.32/fs/ext4/ialloc.c	2012-06-28 12:09:23.393677834 +0200
-+@@ -1199,7 +1199,6 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ialloc.c	2012-08-23 14:51:42.865183031 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ialloc.c	2012-08-23 14:51:48.884107783 +0200
++@@ -1205,7 +1205,6 @@
 + 		if (!gdp)
 + 			continue;
 + 		desc_count += ext4_free_inodes_count(sb, gdp);
@@ -5342,11 +5332,11 @@ index 0000000..204f59c
 + 	}
 + 	return desc_count;
 + #endif
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-06-28 12:09:19.413668742 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-06-28 12:09:23.393677834 +0200
-+@@ -3680,11 +3680,9 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-23 14:51:42.860183093 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-23 14:51:48.887107747 +0200
++@@ -3651,11 +3651,9 @@
 + 		 * block group descriptors.  If the sparse superblocks
 + 		 * feature is turned on, then not all groups have this.
 + 		 */
@@ -5359,16 +5349,16 @@ index 0000000..204f59c
 + 
 + 		/*
 + 		 * Every block group has an inode bitmap, a block
-diff --git a/ldiskfs/kernel_patches/patches/ext4-store-tree-generation-at-find-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-store-tree-generation-at-find-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-store-tree-generation-at-find-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-store-tree-generation-at-find-squeeze.patch
 new file mode 100644
-index 0000000..b32e180
+index 0000000..4308857
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-store-tree-generation-at-find-2.6.32-vanilla.patch
-@@ -0,0 +1,67 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4_extents.h
++++ b/ldiskfs/kernel_patches/patches/ext4-store-tree-generation-at-find-squeeze.patch
+@@ -0,0 +1,59 @@
++Index: linux-2.6-2.6.32/fs/ext4/ext4_extents.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4_extents.h	2012-06-28 12:10:23.325664479 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4_extents.h	2012-06-28 12:11:48.561664193 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4_extents.h	2012-08-23 15:31:05.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4_extents.h	2012-08-24 10:52:56.941133087 +0200
 +@@ -113,6 +113,7 @@
 +  * Truncate uses it to simulate recursive walking.
 +  */
@@ -5377,11 +5367,11 @@ index 0000000..b32e180
 + 	ext4_fsblk_t			p_block;
 + 	__u16				p_depth;
 + 	struct ext4_extent		*p_ext;
-+Index: linux-source-2.6.32/fs/ext4/extents.c
++Index: linux-2.6-2.6.32/fs/ext4/extents.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/extents.c	2012-06-28 12:10:54.881664295 +0200
-++++ linux-source-2.6.32/fs/ext4/extents.c	2012-06-28 12:11:48.565668571 +0200
-+@@ -1763,7 +1763,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/extents.c	2012-08-24 10:52:25.464526599 +0200
+++++ linux-2.6-2.6.32/fs/ext4/extents.c	2012-08-24 10:52:56.943133061 +0200
++@@ -1751,7 +1751,7 @@
 + {
 + 	struct ext4_ext_path *path = NULL;
 + 	struct ext4_ext_cache cbex;
@@ -5390,11 +5380,9 @@ index 0000000..b32e180
 + 	ext4_lblk_t next, start = 0, end = 0;
 + 	ext4_lblk_t last = block + num;
 + 	int depth, exists, err = 0;
-+@@ -1776,17 +1776,29 @@
++@@ -1764,15 +1764,23 @@
 + 		/* find extent for this block */
-+ 		down_read(&EXT4_I(inode)->i_data_sem);
 + 		path = ext4_ext_find_extent(inode, block, path);
-+-		up_read(&EXT4_I(inode)->i_data_sem);
 + 		if (IS_ERR(path)) {
 ++			up_read(&EXT4_I(inode)->i_data_sem);
 + 			err = PTR_ERR(path);
@@ -5405,14 +5393,8 @@ index 0000000..b32e180
 ++		path[0].p_generation = EXT4_I(inode)->i_ext_generation;
 ++
 + 		depth = ext_depth(inode);
-+-		BUG_ON(path[depth].p_hdr == NULL);
++ 		BUG_ON(path[depth].p_hdr == NULL);
 +-		ex = path[depth].p_ext;
-++		if (unlikely(path[depth].p_hdr == NULL)) {
-++			up_read(&EXT4_I(inode)->i_data_sem);
-++			ext4_error_inode(__func__, inode, "path[%d].p_hdr == NULL", depth);
-++			err = -EIO;
-++			break;
-++		}
 ++		ex = NULL;
 ++		if (path[depth].p_ext) {
 ++			_ex = *path[depth].p_ext;
@@ -5423,7 +5405,7 @@ index 0000000..b32e180
 + 
 + 		exists = 0;
 + 		if (!ex) {
-+@@ -1836,7 +1848,7 @@
++@@ -1822,7 +1830,7 @@
 + 		}
 + 
 + 		BUG_ON(cbex.ec_len == 0);
@@ -5432,548 +5414,17 @@ index 0000000..b32e180
 + 		ext4_ext_drop_refs(path);
 + 
 + 		if (err < 0)
-diff --git a/ldiskfs/kernel_patches/patches/ext4-update-vanilla-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-update-vanilla-2.6.32-vanilla.patch
-new file mode 100644
-index 0000000..259fce6
---- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-update-vanilla-2.6.32-vanilla.patch
-@@ -0,0 +1,525 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
-+===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-04 15:58:11.971815527 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-04 15:58:13.150716936 +0200
-+@@ -23,6 +23,7 @@
-+ #include <linux/quota.h>
-+ #include <linux/rwsem.h>
-+ #include <linux/rbtree.h>
-++#include <linux/kernel.h>
-+ #include <linux/seqlock.h>
-+ #include <linux/mutex.h>
-+ #include <linux/timer.h>
-+@@ -1109,6 +1116,9 @@
-+ 
-+ 	/* workqueue for dio unwritten */
-+ 	struct workqueue_struct *dio_unwritten_wq;
-++
-++	/* Lazy inode table initialization info */
-++	struct ext4_li_request *s_li_request;
-+ };
-+ 
-+ static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb)
-+@@ -1430,6 +1440,23 @@
-+ extern struct proc_dir_entry *ext4_proc_root;
-+ 
-+ /*
-++ * Timeout and state flag for lazy initialization inode thread.
-++ */
-++#define EXT4_DEF_LI_WAIT_MULT			10
-++#define EXT4_DEF_LI_MAX_START_DELAY		5
-++#define EXT4_LAZYINIT_QUIT			0x0001
-++#define EXT4_LAZYINIT_RUNNING			0x0002
-++
-++/*
-++ * Lazy inode table initialization info
-++ */
-++struct ext4_lazy_init {
-++	unsigned long		li_state;
-++	struct list_head	li_request_list;
-++	struct mutex		li_list_mtx;
-++};
-++    
-++/*
-+  * Function prototypes
-+  */
-+ 
-+@@ -1508,6 +1535,7 @@
-+ extern void mark_bitmap_end(int start_bit, int end_bit, char *bitmap);
-+ 
-+ /* mballoc.c */
-++struct fstrim_range;
-+ extern long ext4_mb_stats;
-+ extern long ext4_mb_max_to_scan;
-+ extern int ext4_mb_init(struct super_block *, int);
-+@@ -1525,6 +1553,7 @@
-+ 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);
-++extern int ext4_trim_fs(struct super_block *, struct fstrim_range *);
-+ /* inode.c */
-+ int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
-+ 		struct buffer_head *bh, ext4_fsblk_t blocknr);
-+@@ -1580,6 +1580,8 @@ extern int ext4_group_extend(struct supe
-+ /* super.c */
-+ extern void ext4_error(struct super_block *, const char *, const char *, ...)
-+ 	__attribute__ ((format (printf, 3, 4)));
-++extern void ext4_error_inode(const char *, struct inode *, const char *, ...)
-++	__attribute__ ((format (printf, 3, 4)));
-+ extern void __ext4_std_error(struct super_block *, const char *, int);
-+ extern void ext4_abort(struct super_block *, const char *, const char *, ...)
-+ 	__attribute__ ((format (printf, 3, 4)));
-+Index: linux-source-2.6.32/fs/ext4/ext4_extents.h
-+===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4_extents.h	2012-07-04 15:58:09.640229219 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4_extents.h	2012-07-04 15:58:13.150716936 +0200
-+@@ -138,7 +138,7 @@
-+ #define EXT_REPEAT     2
-+ 
-+ /* Maximum logical block in a file; ext4_extent's ee_block is __le32 */
-+-#define EXT_MAX_BLOCK	0xffffffff
-++#define EXT_MAX_BLOCKS	0xffffffff
-+ 
-+ /*
-+  * EXT_INIT_MAX_LEN is the maximum number of blocks we can have in an
-+Index: linux-source-2.6.32/fs/ext4/extents.c
-+===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/extents.c	2012-07-04 15:58:09.640229219 +0200
-++++ linux-source-2.6.32/fs/ext4/extents.c	2012-07-04 15:58:13.150716936 +0200
-+@@ -1329,7 +1329,7 @@
-+ 
-+ /*
-+  * ext4_ext_next_allocated_block:
-+- * returns allocated block in subsequent extent or EXT_MAX_BLOCK.
-++ * returns allocated block in subsequent extent or EXT_MAX_BLOCKS.
-+  * NOTE: it considers block number from index entry as
-+  * allocated block. Thus, index entries have to be consistent
-+  * with leaves.
-+@@ -1343,7 +1343,7 @@
-+ 	depth = path->p_depth;
-+ 
-+ 	if (depth == 0 && path->p_ext == NULL)
-+-		return EXT_MAX_BLOCK;
-++		return EXT_MAX_BLOCKS;
-+ 
-+ 	while (depth >= 0) {
-+ 		if (depth == path->p_depth) {
-+@@ -1360,12 +1360,12 @@
-+ 		depth--;
-+ 	}
-+ 
-+-	return EXT_MAX_BLOCK;
-++	return EXT_MAX_BLOCKS;
-+ }
-+ 
-+ /*
-+  * ext4_ext_next_leaf_block:
-+- * returns first allocated block from next leaf or EXT_MAX_BLOCK
-++ * returns first allocated block from next leaf or EXT_MAX_BLOCKS
-+  */
-+ static ext4_lblk_t ext4_ext_next_leaf_block(struct inode *inode,
-+ 					struct ext4_ext_path *path)
-+@@ -1377,7 +1377,7 @@
-+ 
-+ 	/* zero-tree has no leaf blocks at all */
-+ 	if (depth == 0)
-+-		return EXT_MAX_BLOCK;
-++		return EXT_MAX_BLOCKS;
-+ 
-+ 	/* go to index block */
-+ 	depth--;
-+@@ -1390,7 +1390,7 @@
-+ 		depth--;
-+ 	}
-+ 
-+-	return EXT_MAX_BLOCK;
-++	return EXT_MAX_BLOCKS;
-+ }
-+ 
-+ /*
-+@@ -1570,13 +1570,13 @@
-+ 	 */
-+ 	if (b2 < b1) {
-+ 		b2 = ext4_ext_next_allocated_block(path);
-+-		if (b2 == EXT_MAX_BLOCK)
-++		if (b2 == EXT_MAX_BLOCKS)
-+ 			goto out;
-+ 	}
-+ 
-+ 	/* check for wrap through zero on extent logical start block*/
-+ 	if (b1 + len1 < b1) {
-+-		len1 = EXT_MAX_BLOCK - b1;
-++		len1 = EXT_MAX_BLOCKS - b1;
-+ 		newext->ee_len = cpu_to_le16(len1);
-+ 		ret = 1;
-+ 	}
-+@@ -1652,7 +1652,7 @@
-+ 	fex = EXT_LAST_EXTENT(eh);
-+ 	next = ext4_ext_next_leaf_block(inode, path);
-+ 	if (le32_to_cpu(newext->ee_block) > le32_to_cpu(fex->ee_block)
-+-	    && next != EXT_MAX_BLOCK) {
-++	    && next != EXT_MAX_BLOCKS) {
-+ 		ext_debug("next leaf block - %d\n", next);
-+ 		BUG_ON(npath != NULL);
-+ 		npath = ext4_ext_find_extent(inode, next, NULL);
-+@@ -1771,7 +1771,7 @@
-+ 	BUG_ON(func == NULL);
-+ 	BUG_ON(inode == NULL);
-+ 
-+-	while (block < last && block != EXT_MAX_BLOCK) {
-++	while (block < last && block != EXT_MAX_BLOCKS) {
-+ 		num = last - block;
-+ 		/* find extent for this block */
-+ 		down_read(&EXT4_I(inode)->i_data_sem);
-+@@ -1899,7 +1899,7 @@
-+ 	if (ex == NULL) {
-+ 		/* there is no extent yet, so gap is [0;-] */
-+ 		lblock = 0;
-+-		len = EXT_MAX_BLOCK;
-++		len = EXT_MAX_BLOCKS;
-+ 		ext_debug("cache gap(whole file):");
-+ 	} else if (block < le32_to_cpu(ex->ee_block)) {
-+ 		lblock = block;
-+@@ -2144,8 +2144,8 @@
-+ 		path[depth].p_ext = ex;
-+ 
-+ 		a = ex_ee_block > start ? ex_ee_block : start;
-+-		b = ex_ee_block + ex_ee_len - 1 < EXT_MAX_BLOCK ?
-+-			ex_ee_block + ex_ee_len - 1 : EXT_MAX_BLOCK;
-++		b = ex_ee_block + ex_ee_len - 1 < EXT_MAX_BLOCKS ?
-++			ex_ee_block + ex_ee_len - 1 : EXT_MAX_BLOCKS;
-+ 
-+ 		ext_debug("  border %u:%u\n", a, b);
-+ 
-+@@ -3783,15 +3783,15 @@
-+ 		flags |= FIEMAP_EXTENT_UNWRITTEN;
-+ 
-+ 	/*
-+-	 * If this extent reaches EXT_MAX_BLOCK, it must be last.
-++	 * If this extent reaches EXT_MAX_BLOCKS, it must be last.
-+ 	 *
-+-	 * Or if ext4_ext_next_allocated_block is EXT_MAX_BLOCK,
-++	 * Or if ext4_ext_next_allocated_block is EXT_MAX_BLOCKS,
-+ 	 * this also indicates no more allocated blocks.
-+ 	 *
-+-	 * XXX this might miss a single-block extent at EXT_MAX_BLOCK
-++	 * XXX this might miss a single-block extent at EXT_MAX_BLOCKS
-+ 	 */
-+-	if (ext4_ext_next_allocated_block(path) == EXT_MAX_BLOCK ||
-+-	    newex->ec_block + newex->ec_len - 1 == EXT_MAX_BLOCK) {
-++	if (ext4_ext_next_allocated_block(path) == EXT_MAX_BLOCKS ||
-++	    newex->ec_block + newex->ec_len - 1 == EXT_MAX_BLOCKS) {
-+ 		loff_t size = i_size_read(inode);
-+ 		loff_t bs = EXT4_BLOCK_SIZE(inode->i_sb);
-+ 
-+@@ -3872,8 +3872,8 @@
-+ 
-+ 		start_blk = start >> inode->i_sb->s_blocksize_bits;
-+ 		last_blk = (start + len - 1) >> inode->i_sb->s_blocksize_bits;
-+-		if (last_blk >= EXT_MAX_BLOCK)
-+-			last_blk = EXT_MAX_BLOCK-1;
-++		if (last_blk >= EXT_MAX_BLOCKS)
-++			last_blk = EXT_MAX_BLOCKS-1;
-+ 		len_blks = ((ext4_lblk_t) last_blk) - start_blk + 1;
-+ 
-+ 		/*
-+Index: linux-source-2.6.32/fs/ext4/mballoc.c
-+===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/mballoc.c	2012-07-04 15:58:03.138714913 +0200
-++++ linux-source-2.6.32/fs/ext4/mballoc.c	2012-07-04 15:58:13.150716936 +0200
-+@@ -862,8 +862,6 @@
-+ 
-+ 	err = 0;
-+ 	first_block = page->index * blocks_per_page;
-+-	/* init the page  */
-+-	memset(page_address(page), 0xff, PAGE_CACHE_SIZE);
-+ 	for (i = 0; i < blocks_per_page; i++) {
-+ 		int group;
-+ 		struct ext4_group_info *grinfo;
-+@@ -899,6 +897,8 @@
-+ 			 * incore got set to the group block bitmap below
-+ 			 */
-+ 			ext4_lock_group(sb, group);
-++			/* init the page  */
-++			memset(data, 0xff, blocksize);
-+ 			ext4_mb_generate_buddy(sb, data, incore, group);
-+ 			ext4_unlock_group(sb, group);
-+ 			incore = NULL;
-+@@ -1862,7 +1862,6 @@
-+ 	}
-+ }
-+ 
-+-/* This is now called BEFORE we load the buddy bitmap. */
-+ static int ext4_mb_good_group(struct ext4_allocation_context *ac,
-+ 				ext4_group_t group, int cr)
-+ {
-+@@ -2162,6 +2161,11 @@
-+ 	return (void *) ((unsigned long) group);
-+ }
-+ 
-++static inline void ext4_mb_release_desc(struct ext4_buddy *e4b)
-++{
-++	ext4_mb_unload_buddy(e4b);
-++}
-++
-+ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
-+ {
-+ 	struct super_block *sb = seq->private;
-+@@ -2193,7 +2197,7 @@
-+ 	ext4_lock_group(sb, group);
-+ 	memcpy(&sg, ext4_get_group_info(sb, group), i);
-+ 	ext4_unlock_group(sb, group);
-+-	ext4_mb_unload_buddy(&e4b);
-++	ext4_mb_release_desc(&e4b);
-+ 
-+ 	seq_printf(seq, "#%-5u: %-5u %-5u %-5u [", group, sg.info.bb_free,
-+ 			sg.info.bb_fragments, sg.info.bb_first_free);
-+@@ -2562,6 +2566,17 @@
-+ 	return 0;
-+ }
-+ 
-++static inline int ext4_issue_discard(struct super_block *sb,
-++		ext4_group_t block_group, ext4_grpblk_t block, int count)
-++{
-++	ext4_fsblk_t discard_block;
-++
-++	discard_block = block + ext4_group_first_block_no(sb, block_group);
-++	trace_ext4_discard_blocks(sb,
-++			(unsigned long long) discard_block, count);
-++	return sb_issue_discard(sb, discard_block, count);
-++}
-++
-+ /*
-+  * This function is called by the jbd2 layer once the commit has finished,
-+  * so we know we can free the blocks that were released with that commit.
-+@@ -2583,14 +2598,8 @@
-+ 
-+ 		if (test_opt(sb, DISCARD)) {
-+ 			int ret;
-+-			ext4_fsblk_t discard_block;
-+-
-+-			discard_block = entry->start_blk +
-+-				ext4_group_first_block_no(sb, entry->group);
-+-			trace_ext4_discard_blocks(sb,
-+-					(unsigned long long)discard_block,
-+-					entry->count);
-+-			ret = sb_issue_discard(sb, discard_block, entry->count);
-++			ret = ext4_issue_discard(sb, entry->group,
-++					entry->start_blk, entry->count);
-+ 			if (ret == EOPNOTSUPP) {
-+ 				ext4_warning(sb, __func__,
-+ 					"discard not supported, disabling");
-+@@ -2620,7 +2629,7 @@
-+ 		}
-+ 		ext4_unlock_group(sb, entry->group);
-+ 		kmem_cache_free(ext4_free_ext_cachep, entry);
-+-		ext4_mb_unload_buddy(&e4b);
-++		ext4_mb_release_desc(&e4b);
-+ 	}
-+ 
-+ 	mb_debug(1, "freed %u blocks in %u structures\n", count, count2);
-+Index: linux-source-2.6.32/fs/ext4/move_extent.c
-+===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/move_extent.c	2012-07-04 15:58:03.146697695 +0200
-++++ linux-source-2.6.32/fs/ext4/move_extent.c	2012-07-04 15:58:13.150716936 +0200
-+@@ -1001,12 +1001,12 @@
-+ 		return -EINVAL;
-+ 	}
-+ 
-+-	if ((orig_start > EXT_MAX_BLOCK) ||
-+-	    (donor_start > EXT_MAX_BLOCK) ||
-+-	    (*len > EXT_MAX_BLOCK) ||
-+-	    (orig_start + *len > EXT_MAX_BLOCK))  {
-++	if ((orig_start > EXT_MAX_BLOCKS) ||
-++	    (donor_start > EXT_MAX_BLOCKS) ||
-++	    (*len > EXT_MAX_BLOCKS) ||
-++	    (orig_start + *len > EXT_MAX_BLOCKS))  {
-+ 		ext4_debug("ext4 move extent: Can't handle over [%u] blocks "
-+-			"[ino:orig %lu, donor %lu]\n", EXT_MAX_BLOCK,
-++			"[ino:orig %lu, donor %lu]\n", EXT_MAX_BLOCKS,
-+ 			orig_inode->i_ino, donor_inode->i_ino);
-+ 		return -EINVAL;
-+ 	}
-+Index: linux-source-2.6.32/fs/ext4/super.c
-+===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-04 15:58:08.423211192 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-04 15:58:13.154819502 +0200
-+@@ -52,6 +52,8 @@
-+ 
-+ struct proc_dir_entry *ext4_proc_root;
-+ static struct kset *ext4_kset;
-++static struct ext4_lazy_init *ext4_li_info;
-++static struct mutex ext4_li_mtx;
-+ 
-+ static int ext4_load_journal(struct super_block *, struct ext4_super_block *,
-+ 			     unsigned long journal_devnum);
-+@@ -350,6 +352,42 @@
-+ 	ext4_handle_error(sb);
-+ }
-+ 
-++void ext4_error_inode(const char *function, struct inode *inode,
-++		const char *fmt, ...)
-++{
-++	va_list args;
-++
-++	va_start(args, fmt);
-++	printk(KERN_CRIT "EXT4-fs error (device %s): %s: inode #%lu: (comm %s) ",
-++			inode->i_sb->s_id, function, inode->i_ino, current->comm);
-++	vprintk(fmt, args);
-++	printk("\n");
-++	va_end(args);
-++
-++	ext4_handle_error(inode->i_sb);
-++}
-++
-++void ext4_error_file(const char *function, struct file *file,
-++		const char *fmt, ...)
-++{
-++	va_list args;
-++	struct inode *inode = file->f_dentry->d_inode;
-++	char pathname[80], *path;
-++
-++	va_start(args, fmt);
-++	path = d_path(&(file->f_path), pathname, sizeof(pathname));
-++	if (!path)
-++		path = "(unknown)";
-++	printk(KERN_CRIT
-++		"EXT4-fs error (device %s): %s: inode #%lu (comm %s path %s): ",
-++		inode->i_sb->s_id, function, inode->i_ino, current->comm, path);
-++	vprintk(fmt, args);
-++	printk("\n");
-++	va_end(args);
-++	
-++	ext4_handle_error(inode->i_sb);
-++}
-++
-+ static const char *ext4_decode_error(struct super_block *sb, int errno,
-+ 				     char nbuf[16])
-+ {
-+@@ -1095,13 +1133,14 @@
-+ 	Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
-+ 	Opt_data_err_abort, Opt_data_err_ignore,
-+ 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
-+-	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
-+-	Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err, Opt_resize,
-+-	Opt_usrquota, Opt_grpquota, Opt_i_version,
-++	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
-++	Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err,
-++	Opt_resize, Opt_usrquota, Opt_grpquota, Opt_i_version,
-+ 	Opt_stripe, Opt_delalloc, Opt_nodelalloc,
-+ 	Opt_block_validity, Opt_noblock_validity,
-+ 	Opt_inode_readahead_blks, Opt_journal_ioprio,
-+ 	Opt_discard, Opt_nodiscard,
-++	Opt_init_inode_table, Opt_noinit_inode_table,
-+ };
-+ 
-+ static const match_table_t tokens = {
-+@@ -2705,6 +2744,21 @@
-+ 	get_random_bytes(&sbi->s_next_generation, sizeof(u32));
-+ 	spin_lock_init(&sbi->s_next_gen_lock);
-+ 
-++	err = percpu_counter_init(&sbi->s_freeblocks_counter,
-++			ext4_count_free_blocks(sb));
-++	if (!err)
-++		err = percpu_counter_init(&sbi->s_freeinodes_counter,
-++					  ext4_count_free_inodes(sb));
-++	if (!err)
-++		err = percpu_counter_init(&sbi->s_dirs_counter,
-++					  ext4_count_dirs(sb));
-++	if (!err)
-++		err = percpu_counter_init(&sbi->s_dirtyblocks_counter, 0);
-++	if (err) {
-++		ext4_msg(sb, KERN_ERR, "insufficient memory");
-++		goto failed_mount3;
-++	}
-++
-+ 	sbi->s_stripe = ext4_get_stripe_size(sbi);
-+ 	sbi->s_max_writeback_mb_bump = 128;
-+ 
-+@@ -2824,20 +2878,6 @@
-+ 	set_task_ioprio(sbi->s_journal->j_task, journal_ioprio);
-+ 
-+ no_journal:
-+-	err = percpu_counter_init(&sbi->s_freeblocks_counter,
-+-				  ext4_count_free_blocks(sb));
-+-	if (!err)
-+-		err = percpu_counter_init(&sbi->s_freeinodes_counter,
-+-					  ext4_count_free_inodes(sb));
-+-	if (!err)
-+-		err = percpu_counter_init(&sbi->s_dirs_counter,
-+-					  ext4_count_dirs(sb));
-+-	if (!err)
-+-		err = percpu_counter_init(&sbi->s_dirtyblocks_counter, 0);
-+-	if (err) {
-+-		ext4_msg(sb, KERN_ERR, "insufficient memory");
-+-		goto failed_mount_wq;
-+-	}
-+ 	if (test_opt(sb, NOBH)) {
-+ 		if (!(test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_WRITEBACK_DATA)) {
-+ 			ext4_msg(sb, KERN_WARNING, "Ignoring nobh option - "
-+@@ -2970,10 +3010,6 @@
-+ 		jbd2_journal_destroy(sbi->s_journal);
-+ 		sbi->s_journal = NULL;
-+ 	}
-+-	percpu_counter_destroy(&sbi->s_freeblocks_counter);
-+-	percpu_counter_destroy(&sbi->s_freeinodes_counter);
-+-	percpu_counter_destroy(&sbi->s_dirs_counter);
-+-	percpu_counter_destroy(&sbi->s_dirtyblocks_counter);
-+ failed_mount3:
-+ 	if (sbi->s_flex_groups) {
-+ 		if (is_vmalloc_addr(sbi->s_flex_groups))
-+@@ -2981,6 +3017,10 @@
-+ 		else
-+ 			kfree(sbi->s_flex_groups);
-+ 	}
-++	percpu_counter_destroy(&sbi->s_freeblocks_counter);
-++	percpu_counter_destroy(&sbi->s_freeinodes_counter);
-++	percpu_counter_destroy(&sbi->s_dirs_counter);
-++	percpu_counter_destroy(&sbi->s_dirtyblocks_counter);
-+ failed_mount2:
-+ 	for (i = 0; i < db_count; i++)
-+ 		brelse(sbi->s_group_desc[i]);
-+@@ -4003,6 +4043,15 @@
-+ 	.fs_flags	= FS_REQUIRES_DEV,
-+ };
-+ 
-++static int __init ext4_init_feat_adverts(void)
-++{
-++	return 0;
-++}
-++
-++static void ext4_exit_feat_adverts(void)
-++{
-++}
-++
-+ static int __init init_ext4_fs(void)
-+ {
-+ 	int err;
-+@@ -4015,6 +4064,9 @@
-+ 	if (!ext4_kset)
-+ 		goto out4;
-+ 	ext4_proc_root = proc_mkdir("fs/ext4", NULL);
-++
-++	err = ext4_init_feat_adverts();
-++
-+ 	err = init_ext4_mballoc();
-+ 	if (err)
-+ 		goto out3;
-+@@ -4028,6 +4080,9 @@
-+ 	err = register_filesystem(&ext4_fs_type);
-+ 	if (err)
-+ 		goto out;
-++
-++	ext4_li_info = NULL;
-++	mutex_init(&ext4_li_mtx);
-+ 	return 0;
-+ out:
-+ 	destroy_inodecache();
-+@@ -4036,6 +4091,7 @@
-+ out2:
-+ 	exit_ext4_mballoc();
-+ out3:
-++	ext4_exit_feat_adverts();
-+ 	remove_proc_entry("fs/ext4", NULL);
-+ 	kset_unregister(ext4_kset);
-+ out4:
-diff --git a/ldiskfs/kernel_patches/patches/ext4-vmalloc-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-vmalloc-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-vmalloc-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-vmalloc-squeeze.patch
 new file mode 100644
-index 0000000..a8a151c
+index 0000000..278075c
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-vmalloc-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-vmalloc-squeeze.patch
 @@ -0,0 +1,210 @@
-+Index: linux-source-2.6.32/fs/ext4/super.c
++Index: linux-2.6-2.6.32/fs/ext4/super.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/super.c	2012-07-04 11:15:17.645376714 +0200
-++++ linux-source-2.6.32/fs/ext4/super.c	2012-07-04 11:15:26.913377451 +0200
-+@@ -677,7 +677,12 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/super.c	2012-08-24 10:27:29.326230850 +0200
+++++ linux-2.6-2.6.32/fs/ext4/super.c	2012-08-24 10:28:47.683251303 +0200
++@@ -636,7 +636,12 @@
 + 
 + 	for (i = 0; i < sbi->s_gdb_count; i++)
 + 		brelse(sbi->s_group_desc[i]);
@@ -5987,7 +5438,7 @@ index 0000000..a8a151c
 + 	if (is_vmalloc_addr(sbi->s_flex_groups))
 + 		vfree(sbi->s_flex_groups);
 + 	else
-+@@ -2505,12 +2510,13 @@
++@@ -2431,12 +2436,13 @@
 + 	unsigned long offset = 0;
 + 	unsigned long journal_devnum = 0;
 + 	unsigned long def_mount_opts;
@@ -6002,7 +5453,7 @@ index 0000000..a8a151c
 + 	unsigned int i;
 + 	int needs_recovery, has_huge_files;
 + 	__u64 blocks_count;
-+@@ -2833,11 +2839,18 @@
++@@ -2759,11 +2765,18 @@
 + 			(EXT4_MAX_BLOCK_FILE_PHYS / EXT4_BLOCKS_PER_GROUP(sb)));
 + 	db_count = (sbi->s_groups_count + EXT4_DESC_PER_BLOCK(sb) - 1) /
 + 		   EXT4_DESC_PER_BLOCK(sb);
@@ -6025,7 +5476,7 @@ index 0000000..a8a151c
 + 	}
 + 
 + #ifdef __BIG_ENDIAN
-+@@ -3043,17 +3056,16 @@
++@@ -2973,17 +2986,16 @@
 + 	if (IS_ERR(root)) {
 + 		ext4_msg(sb, KERN_ERR, "get root inode failed");
 + 		ret = PTR_ERR(root);
@@ -6044,7 +5495,7 @@ index 0000000..a8a151c
 + 		ret = -ENOMEM;
 + 		goto failed_mount4;
 + 	}
-+@@ -3104,6 +3116,7 @@
++@@ -3034,6 +3046,7 @@
 + 	if (err) {
 + 		ext4_msg(sb, KERN_ERR, "failed to initalize mballoc (%d)",
 + 			 err);
@@ -6052,7 +5503,7 @@ index 0000000..a8a151c
 + 		goto failed_mount4;
 + 	}
 + 
-+@@ -3145,6 +3158,8 @@
++@@ -3075,6 +3088,8 @@
 + 	goto failed_mount;
 + 
 + failed_mount4:
@@ -6061,7 +5512,7 @@ index 0000000..a8a151c
 + 	ext4_msg(sb, KERN_ERR, "mount failed");
 + 	destroy_workqueue(EXT4_SB(sb)->dio_unwritten_wq);
 + failed_mount_wq:
-+@@ -3169,7 +3184,11 @@
++@@ -3099,7 +3114,11 @@
 + failed_mount2:
 + 	for (i = 0; i < db_count; i++)
 + 		brelse(sbi->s_group_desc[i]);
@@ -6074,11 +5525,11 @@ index 0000000..a8a151c
 + failed_mount:
 + 	if (sbi->s_proc) {
 + 		remove_proc_entry(sb->s_id, ext4_proc_root);
-+Index: linux-source-2.6.32/fs/ext4/mballoc.c
++Index: linux-2.6-2.6.32/fs/ext4/mballoc.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/mballoc.c	2012-07-04 11:15:03.525371414 +0200
-++++ linux-source-2.6.32/fs/ext4/mballoc.c	2012-07-04 11:15:26.913377451 +0200
-+@@ -2473,24 +2473,37 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/mballoc.c	2012-08-24 10:14:50.758714300 +0200
+++++ linux-2.6-2.6.32/fs/ext4/mballoc.c	2012-08-24 10:28:47.688251241 +0200
++@@ -2425,24 +2425,37 @@
 + 	while (array_size < sizeof(*sbi->s_group_info) *
 + 	       num_meta_group_infos_max)
 + 		array_size = array_size << 1;
@@ -6124,7 +5575,7 @@ index 0000000..a8a151c
 + 				"EXT4-fs: can't read descriptor %u\n", i);
 + 			goto err_freebuddy;
 + 		}
-+@@ -2508,7 +2521,10 @@
++@@ -2460,7 +2473,10 @@
 + 		kfree(sbi->s_group_info[i]);
 + 	iput(sbi->s_buddy_cache);
 + err_freesgi:
@@ -6136,7 +5587,7 @@ index 0000000..a8a151c
 + 	return -ENOMEM;
 + }
 + 
-+@@ -2549,14 +2565,6 @@
++@@ -2501,14 +2517,6 @@
 + 		i++;
 + 	} while (i <= sb->s_blocksize_bits + 1);
 + 
@@ -6151,7 +5602,7 @@ index 0000000..a8a151c
 + 	spin_lock_init(&sbi->s_md_lock);
 + 	spin_lock_init(&sbi->s_bal_lock);
 + 
-+@@ -2626,6 +2634,15 @@
++@@ -2578,6 +2586,15 @@
 + 		spin_lock_init(&lg->lg_prealloc_lock);
 + 	}
 + 
@@ -6167,7 +5618,7 @@ index 0000000..a8a151c
 + 	if (sbi->s_proc) {
 + 		struct proc_dir_entry *p;
 + 		proc_create_data("mb_groups", S_IRUGO, sbi->s_proc,
-+@@ -2686,7 +2703,10 @@
++@@ -2638,7 +2655,10 @@
 + 			EXT4_DESC_PER_BLOCK_BITS(sb);
 + 		for (i = 0; i < num_meta_group_infos; i++)
 + 			kfree(sbi->s_group_info[i]);
@@ -6179,16 +5630,16 @@ index 0000000..a8a151c
 + 	}
 + 	kfree(sbi->s_mb_offsets);
 + 	kfree(sbi->s_mb_maxs);
-diff --git a/ldiskfs/kernel_patches/patches/ext4-wantedi-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-wantedi-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-wantedi-2.6-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-wantedi-2.6-squeeze.patch
 new file mode 100644
-index 0000000..d9bf1d9
+index 0000000..7806e8d
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-wantedi-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-wantedi-2.6-squeeze.patch
 @@ -0,0 +1,80 @@
-+Index: linux-source-2.6.32/fs/ext4/namei.c
++Index: linux-2.6-2.6.32/fs/ext4/namei.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-06-28 12:08:39.705675504 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-06-28 12:08:58.217663806 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/namei.c	2012-08-23 14:43:23.910420823 +0200
+++++ linux-2.6-2.6.32/fs/ext4/namei.c	2012-08-23 14:51:32.598311384 +0200
 +@@ -144,6 +144,17 @@
 + 	u16 size;
 + };
@@ -6207,7 +5658,7 @@ index 0000000..d9bf1d9
 + 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);
-+@@ -1753,6 +1764,19 @@
++@@ -1757,6 +1768,19 @@
 + 	return err;
 + }
 + 
@@ -6227,7 +5678,7 @@ index 0000000..d9bf1d9
 + /*
 +  * By the time this is called, we already have created
 +  * the directory cache entry for the new file, but it
-+@@ -1778,7 +1802,8 @@
++@@ -1782,7 +1806,8 @@
 + 	if (IS_DIRSYNC(dir))
 + 		ext4_handle_sync(handle);
 + 
@@ -6237,7 +5688,7 @@ index 0000000..d9bf1d9
 + 	err = PTR_ERR(inode);
 + 	if (!IS_ERR(inode)) {
 + 		inode->i_op = &ext4_file_inode_operations;
-+@@ -1812,7 +1837,8 @@
++@@ -1816,7 +1841,8 @@
 + 	if (IS_DIRSYNC(dir))
 + 		ext4_handle_sync(handle);
 + 
@@ -6247,7 +5698,7 @@ index 0000000..d9bf1d9
 + 	err = PTR_ERR(inode);
 + 	if (!IS_ERR(inode)) {
 + 		init_special_inode(inode, inode->i_mode, rdev);
-+@@ -1850,7 +1876,7 @@
++@@ -1854,7 +1880,7 @@
 + 		ext4_handle_sync(handle);
 + 
 + 	inode = ext4_new_inode(handle, dir, S_IFDIR | mode,
@@ -6256,7 +5707,7 @@ index 0000000..d9bf1d9
 + 	err = PTR_ERR(inode);
 + 	if (IS_ERR(inode))
 + 		goto out_stop;
-+@@ -2271,7 +2297,7 @@
++@@ -2267,7 +2293,7 @@
 + 		ext4_handle_sync(handle);
 + 
 + 	inode = ext4_new_inode(handle, dir, S_IFLNK|S_IRWXUGO,
@@ -6265,17 +5716,17 @@ index 0000000..d9bf1d9
 + 	err = PTR_ERR(inode);
 + 	if (IS_ERR(inode))
 + 		goto out_stop;
-diff --git a/ldiskfs/kernel_patches/patches/ext4-xattr-no-update-ctime-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4-xattr-no-update-ctime-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4-xattr-no-update-ctime-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4-xattr-no-update-ctime-squeeze.patch
 new file mode 100644
-index 0000000..e9eb173
+index 0000000..478ae00
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4-xattr-no-update-ctime-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4-xattr-no-update-ctime-squeeze.patch
 @@ -0,0 +1,32 @@
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:44:31.991217543 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:44:34.954703493 +0200
-+@@ -1524,6 +1524,13 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-23 15:05:04.041166950 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-23 15:08:50.631334186 +0200
++@@ -1376,6 +1376,13 @@
 + #define EXT4_MAX_DIR_SIZE_NAME		"max_dir_size"
 + 
 + /*
@@ -6289,11 +5740,11 @@ index 0000000..e9eb173
 +  * Function prototypes
 +  */
 + 
-+Index: linux-source-2.6.32/fs/ext4/xattr.c
++Index: linux-2.6-2.6.32/fs/ext4/xattr.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/xattr.c	2012-07-04 15:59:29.127204411 +0200
-++++ linux-source-2.6.32/fs/ext4/xattr.c	2012-07-05 11:44:34.954703493 +0200
-+@@ -1045,7 +1045,8 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/xattr.c	2012-08-23 14:43:21.706448377 +0200
+++++ linux-2.6-2.6.32/fs/ext4/xattr.c	2012-08-23 15:08:50.633334162 +0200
++@@ -1044,7 +1044,8 @@
 + 	}
 + 	if (!error) {
 + 		ext4_xattr_update_super_block(handle, inode->i_sb);
@@ -6301,13 +5752,13 @@ index 0000000..e9eb173
 ++		if (!(flags & XATTR_NO_CTIME))
 ++			inode->i_ctime = ext4_current_time(inode);
 + 		if (!value)
-+ 			ext4_clear_inode_state(inode, EXT4_STATE_NO_EXPAND);
++ 			EXT4_I(inode)->i_state &= ~EXT4_STATE_NO_EXPAND;
 + 		error = ext4_mark_iloc_dirty(handle, inode, &is.iloc);
-diff --git a/ldiskfs/kernel_patches/patches/ext4_data_in_dirent-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4_data_in_dirent-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4_data_in_dirent-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4_data_in_dirent-squeeze.patch
 new file mode 100644
-index 0000000..668a814
+index 0000000..8f43c78
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4_data_in_dirent-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/patches/ext4_data_in_dirent-squeeze.patch
 @@ -0,0 +1,521 @@
 +this patch implements feature which allows ext4 fs users (e.g. Lustre)
 +to store data in ext4 dirent.
@@ -6318,10 +5769,10 @@ index 0000000..668a814
 +make use of dentry->d_fsdata to pass fid to ext4. so no
 +changes in ext4_add_entry() interface required.
 +
-+Index: linux-source-2.6.32/fs/ext4/dir.c
++Index: linux-2.6-2.6.32/fs/ext4/dir.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/dir.c	2012-07-04 15:59:27.315205128 +0200
-++++ linux-source-2.6.32/fs/ext4/dir.c	2012-07-05 11:45:11.140204588 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/dir.c	2012-08-24 10:20:45.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/dir.c	2012-08-24 10:23:40.788088021 +0200
 +@@ -53,11 +53,18 @@
 + 
 + static unsigned char get_dtype(struct super_block *sb, int filetype)
@@ -6357,7 +5808,7 @@ index 0000000..668a814
 + 		error_msg = "rec_len is too small for name_len";
 + 	else if (((char *) de - bh->b_data) + rlen > dir->i_sb->s_blocksize)
 + 		error_msg = "directory entry across blocks";
-+@@ -181,7 +188,7 @@
++@@ -179,7 +186,7 @@
 + 				 * failure will be detected in the
 + 				 * dirent test below. */
 + 				if (ext4_rec_len_from_disk(de->rec_len,
@@ -6366,7 +5817,7 @@ index 0000000..668a814
 + 					break;
 + 				i += ext4_rec_len_from_disk(de->rec_len,
 + 							    sb->s_blocksize);
-+@@ -344,12 +351,17 @@
++@@ -342,12 +349,17 @@
 + 	struct fname *fname, *new_fn;
 + 	struct dir_private_info *info;
 + 	int len;
@@ -6385,7 +5836,7 @@ index 0000000..668a814
 + 	new_fn = kzalloc(len, GFP_KERNEL);
 + 	if (!new_fn)
 + 		return -ENOMEM;
-+@@ -358,7 +370,7 @@
++@@ -356,7 +368,7 @@
 + 	new_fn->inode = le32_to_cpu(dirent->inode);
 + 	new_fn->name_len = dirent->name_len;
 + 	new_fn->file_type = dirent->file_type;
@@ -6394,11 +5845,11 @@ index 0000000..668a814
 + 	new_fn->name[dirent->name_len] = 0;
 + 
 + 	while (*p) {
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:45:07.767713946 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:45:11.140204588 +0200
-+@@ -1262,6 +1262,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-24 10:14:31.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-24 10:23:40.791087985 +0200
++@@ -1131,6 +1131,7 @@
 + #define EXT4_FEATURE_INCOMPAT_64BIT		0x0080
 + #define EXT4_FEATURE_INCOMPAT_MMP               0x0100
 + #define EXT4_FEATURE_INCOMPAT_FLEX_BG		0x0200
@@ -6406,7 +5857,7 @@ index 0000000..668a814
 + 
 + #define EXT4_FEATURE_COMPAT_SUPP	EXT2_FEATURE_COMPAT_EXT_ATTR
 + #define EXT4_FEATURE_INCOMPAT_SUPP	(EXT4_FEATURE_INCOMPAT_FILETYPE| \
-+@@ -1270,7 +1271,9 @@
++@@ -1139,7 +1140,9 @@
 + 					 EXT4_FEATURE_INCOMPAT_EXTENTS| \
 + 					 EXT4_FEATURE_INCOMPAT_64BIT| \
 + 					 EXT4_FEATURE_INCOMPAT_FLEX_BG| \
@@ -6417,7 +5868,7 @@ index 0000000..668a814
 + #define EXT4_FEATURE_RO_COMPAT_SUPP	(EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER| \
 + 					 EXT4_FEATURE_RO_COMPAT_LARGE_FILE| \
 + 					 EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \
-+@@ -1352,6 +1355,43 @@
++@@ -1221,6 +1224,43 @@
 + #define EXT4_FT_SYMLINK		7
 + 
 + #define EXT4_FT_MAX		8
@@ -6461,7 +5912,7 @@ index 0000000..668a814
 + 
 + /*
 +  * EXT4_DIR_PAD defines the directory entries boundaries
-+@@ -1360,8 +1400,11 @@
++@@ -1229,8 +1269,11 @@
 +  */
 + #define EXT4_DIR_PAD			4
 + #define EXT4_DIR_ROUND			(EXT4_DIR_PAD - 1)
@@ -6474,7 +5925,7 @@ index 0000000..668a814
 + #define EXT4_MAX_REC_LEN		((1<<16)-1)
 + 
 + /*
-+@@ -1705,7 +1748,7 @@
++@@ -1555,7 +1598,7 @@
 + 					    struct ext4_dir_entry_2 ** res_dir);
 + #define ll_ext4_find_entry(inode, dentry, res_dir) ext4_find_entry(inode, &(dentry)->d_name, res_dir)
 + extern int ext4_add_dot_dotdot(handle_t *handle, struct inode *dir,
@@ -6483,9 +5934,9 @@ index 0000000..668a814
 + extern struct buffer_head *ext4_append(handle_t *handle,
 + 				       struct inode *inode,
 + 				       ext4_lblk_t *block, int *err);
-+@@ -2038,6 +2081,28 @@
-+ 
-+ #define in_range(b, first, len)	((b) >= (first) && (b) <= (first) + (len) - 1)
++@@ -1883,6 +1926,28 @@
++ 	set_bit(BH_BITMAP_UPTODATE, &(bh)->b_state);
++ }
 + 
 ++/*
 ++ * Compute the total directory entry data length.
@@ -6512,10 +5963,10 @@ index 0000000..668a814
 + #endif	/* __KERNEL__ */
 + 
 + #endif	/* _EXT4_H */
-+Index: linux-source-2.6.32/fs/ext4/namei.c
++Index: linux-2.6-2.6.32/fs/ext4/namei.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-07-05 11:44:56.630714942 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-07-05 11:45:11.144310120 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/namei.c	2012-08-24 10:23:25.290281770 +0200
+++++ linux-2.6-2.6.32/fs/ext4/namei.c	2012-08-24 10:23:40.798087896 +0200
 +@@ -169,7 +169,8 @@
 + static unsigned dx_get_limit(struct dx_entry *entries);
 + static void dx_set_count(struct dx_entry *entries, unsigned value);
@@ -6580,7 +6031,7 @@ index 0000000..668a814
 + 			names++;
 + 		}
 + 		de = ext4_next_entry(de, size);
-+@@ -445,7 +454,8 @@
++@@ -444,7 +453,8 @@
 + 
 + 	entries = (struct dx_entry *) (((char *)info) + info->info_length);
 + 
@@ -6590,7 +6041,7 @@ index 0000000..668a814
 + 						   info->info_length)) {
 + 		ext4_warning(dir->i_sb, __func__,
 + 			     "dx entry: limit != root limit");
-+@@ -635,7 +645,7 @@
++@@ -634,7 +644,7 @@
 + 	de = (struct ext4_dir_entry_2 *) bh->b_data;
 + 	top = (struct ext4_dir_entry_2 *) ((char *) de +
 + 					   dir->i_sb->s_blocksize -
@@ -6599,7 +6050,7 @@ index 0000000..668a814
 + 	for (; de < top; de = ext4_next_entry(de, dir->i_sb->s_blocksize)) {
 + 		if (!ext4_check_dir_entry("htree_dirblock_to_tree", dir, de, bh,
 + 					(block<<EXT4_BLOCK_SIZE_BITS(dir->i_sb))
-+@@ -1048,7 +1058,7 @@
++@@ -1047,7 +1057,7 @@
 + 			goto errout;
 + 		de = (struct ext4_dir_entry_2 *) bh->b_data;
 + 		top = (struct ext4_dir_entry_2 *) ((char *) de + sb->s_blocksize -
@@ -6608,7 +6059,7 @@ index 0000000..668a814
 + 		for (; de < top; de = ext4_next_entry(de, sb->s_blocksize)) {
 + 			int off = (block << EXT4_BLOCK_SIZE_BITS(sb))
 + 				  + ((char *) de - bh->b_data);
-+@@ -1210,7 +1220,7 @@
++@@ -1209,7 +1219,7 @@
 + 	while (count--) {
 + 		struct ext4_dir_entry_2 *de = (struct ext4_dir_entry_2 *) 
 + 						(from + (map->offs<<2));
@@ -6617,7 +6068,7 @@ index 0000000..668a814
 + 		memcpy (to, de, rec_len);
 + 		((struct ext4_dir_entry_2 *) to)->rec_len =
 + 				ext4_rec_len_to_disk(rec_len, blocksize);
-+@@ -1234,7 +1244,7 @@
++@@ -1233,7 +1243,7 @@
 + 	while ((char*)de < base + blocksize) {
 + 		next = ext4_next_entry(de, blocksize);
 + 		if (de->inode && de->name_len) {
@@ -6626,7 +6077,7 @@ index 0000000..668a814
 + 			if (de > to)
 + 				memmove(to, de, rec_len);
 + 			to->rec_len = ext4_rec_len_to_disk(rec_len, blocksize);
-+@@ -1364,10 +1374,16 @@
++@@ -1366,10 +1376,16 @@
 + 	unsigned int	offset = 0;
 + 	unsigned int	blocksize = dir->i_sb->s_blocksize;
 + 	unsigned short	reclen;
@@ -6645,16 +6096,16 @@ index 0000000..668a814
 + 	if (!de) {
 + 		de = (struct ext4_dir_entry_2 *)bh->b_data;
 + 		top = bh->b_data + blocksize - reclen;
-+@@ -1377,7 +1393,7 @@
-+ 				return -EIO;
-+ 			if (ext4_match(namelen, name, de))
++@@ -1383,7 +1399,7 @@
++ 				brelse(bh);
 + 				return -EEXIST;
++ 			}
 +-			nlen = EXT4_DIR_REC_LEN(de->name_len);
 ++			nlen = EXT4_DIR_REC_LEN(de);
 + 			rlen = ext4_rec_len_from_disk(de->rec_len, blocksize);
 + 			if ((de->inode? rlen - nlen: rlen) >= reclen)
 + 				break;
-+@@ -1395,7 +1411,7 @@
++@@ -1402,7 +1418,7 @@
 + 	}
 + 
 + 	/* By now the buffer is marked for journaling */
@@ -6663,7 +6114,7 @@ index 0000000..668a814
 + 	rlen = ext4_rec_len_from_disk(de->rec_len, blocksize);
 + 	if (de->inode) {
 + 		struct ext4_dir_entry_2 *de1 = (struct ext4_dir_entry_2 *)((char *)de + nlen);
-+@@ -1411,6 +1427,12 @@
++@@ -1418,6 +1434,12 @@
 + 		de->inode = 0;
 + 	de->name_len = namelen;
 + 	memcpy(de->name, name, namelen);
@@ -6676,7 +6127,7 @@ index 0000000..668a814
 + 	/*
 + 	 * XXX shouldn't update any times until successful
 + 	 * completion of syscall, but too many callers depend
-+@@ -1508,7 +1530,8 @@
++@@ -1517,7 +1539,8 @@
 + 
 + 	dx_set_block(entries, 1);
 + 	dx_set_count(entries, 1);
@@ -6686,7 +6137,7 @@ index 0000000..668a814
 + 
 + 	/* Initialize as for dx_probe */
 + 	hinfo.hash_version = dx_info->hash_version;
-+@@ -1539,6 +1562,8 @@
++@@ -1546,6 +1569,8 @@
 + 	struct buffer_head * dir_block;
 + 	struct ext4_dir_entry_2 * de;
 + 	int len, journal = 0, err = 0;
@@ -6695,7 +6146,7 @@ index 0000000..668a814
 + 
 + 	if (IS_ERR(handle))
 + 		return PTR_ERR(handle);
-+@@ -1554,19 +1579,24 @@
++@@ -1561,19 +1586,24 @@
 + 	/* the first item must be "." */
 + 	assert(de->name_len == 1 && de->name[0] == '.');
 + 	len = le16_to_cpu(de->rec_len);
@@ -6725,7 +6176,7 @@ index 0000000..668a814
 + 	de = (struct ext4_dir_entry_2 *)
 + 			((char *) de + le16_to_cpu(de->rec_len));
 + 	if (!journal) {
-+@@ -1580,10 +1610,15 @@
++@@ -1587,10 +1617,15 @@
 + 	if (len > 0)
 + 		de->rec_len = cpu_to_le16(len);
 + 	else
@@ -6742,9 +6193,9 @@ index 0000000..668a814
 + 
 + out_journal:
 + 	if (journal) {
-+@@ -2008,12 +2043,13 @@
++@@ -2012,12 +2047,13 @@
 + /* Initialize @inode as a subdirectory of @dir, and add the
-+  * "." and ".." entries into the first directory block. */
++ * "." and ".." entries into the first directory block. */
 + int ext4_add_dot_dotdot(handle_t *handle, struct inode * dir,
 +-			struct inode *inode)
 ++			struct inode *inode,
@@ -6758,7 +6209,7 @@ index 0000000..668a814
 + 
 + 	if (IS_ERR(handle))
 + 		return PTR_ERR(handle);
-+@@ -2026,28 +2062,40 @@
++@@ -2029,28 +2065,40 @@
 + 	inode->i_fop = &ext4_dir_operations;
 + 	inode->i_size = EXT4_I(inode)->i_disksize = inode->i_sb->s_blocksize;
 + 	dir_block = ext4_bread(handle, inode, 0, 1, &err);
@@ -6807,7 +6258,7 @@ index 0000000..668a814
 + 	inode->i_nlink = 2;
 + 	BUFFER_TRACE(dir_block, "call ext4_handle_dirty_metadata");
 + 	ext4_handle_dirty_metadata(handle, dir, dir_block);
-+@@ -2084,9 +2132,12 @@
++@@ -2087,9 +2135,12 @@
 + 	if (IS_ERR(inode))
 + 		goto out_stop;
 + 
@@ -6821,7 +6272,7 @@ index 0000000..668a814
 + 		goto out_stop;
 + 	}
 + 
-+@@ -2122,7 +2173,7 @@
++@@ -2125,7 +2176,7 @@
 + 	int err = 0;
 + 
 + 	sb = inode->i_sb;
@@ -6830,16 +6281,16 @@ index 0000000..668a814
 + 	    !(bh = ext4_bread(NULL, inode, 0, 0, &err))) {
 + 		if (err)
 + 			ext4_error(inode->i_sb, __func__,
-diff --git a/ldiskfs/kernel_patches/patches/ext4_pdirop-2.6.32-vanilla.patch b/ldiskfs/kernel_patches/patches/ext4_pdirop-2.6.32-vanilla.patch
+diff --git a/ldiskfs/kernel_patches/patches/ext4_pdirop-squeeze.patch b/ldiskfs/kernel_patches/patches/ext4_pdirop-squeeze.patch
 new file mode 100644
-index 0000000..158e3e9
+index 0000000..f13b222
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/patches/ext4_pdirop-2.6.32-vanilla.patch
-@@ -0,0 +1,2272 @@
-+Index: linux-source-2.6.32/include/linux/htree_lock.h
++++ b/ldiskfs/kernel_patches/patches/ext4_pdirop-squeeze.patch
+@@ -0,0 +1,2274 @@
++Index: linux-2.6-2.6.32/include/linux/htree_lock.h
 +===================================================================
 +--- /dev/null	1970-01-01 00:00:00.000000000 +0000
-++++ linux-source-2.6.32/include/linux/htree_lock.h	2012-07-05 11:45:24.538721202 +0200
+++++ linux-2.6-2.6.32/include/linux/htree_lock.h	2012-08-24 11:09:17.934868978 +0200
 +@@ -0,0 +1,187 @@
 ++/*
 ++ * include/linux/htree_lock.h
@@ -7028,10 +6479,10 @@ index 0000000..158e3e9
 ++	((lck)->lk_nodes[dep].ln_mode == HTREE_LOCK_NL)
 ++
 ++#endif
-+Index: linux-source-2.6.32/fs/ext4/htree_lock.c
++Index: linux-2.6-2.6.32/fs/ext4/htree_lock.c
 +===================================================================
 +--- /dev/null	1970-01-01 00:00:00.000000000 +0000
-++++ linux-source-2.6.32/fs/ext4/htree_lock.c	2012-07-05 11:45:24.538721202 +0200
+++++ linux-2.6-2.6.32/fs/ext4/htree_lock.c	2012-08-24 11:09:17.936868952 +0200
 +@@ -0,0 +1,880 @@
 ++/*
 ++ * fs/ext4/htree_lock.c
@@ -7913,19 +7364,19 @@ index 0000000..158e3e9
 ++	kfree(lck);
 ++}
 ++EXPORT_SYMBOL(htree_lock_free);
-+Index: linux-source-2.6.32/fs/ext4/ext4.h
++Index: linux-2.6-2.6.32/fs/ext4/ext4.h
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/ext4.h	2012-07-05 11:45:18.746714659 +0200
-++++ linux-source-2.6.32/fs/ext4/ext4.h	2012-07-05 11:45:24.538721202 +0200
-+@@ -29,6 +29,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/ext4.h	2012-08-24 10:28:35.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/ext4.h	2012-08-24 11:09:17.940868903 +0200
++@@ -28,6 +28,7 @@
 + #include <linux/mutex.h>
 + #include <linux/timer.h>
 + #include <linux/wait.h>
 ++#include <linux/htree_lock.h>
 + #include <linux/blockgroup_lock.h>
 + #include <linux/percpu_counter.h>
-+ #ifdef __KERNEL__
-+@@ -1273,6 +1274,7 @@
++ 
++@@ -1142,6 +1143,7 @@
 + #define EXT4_FEATURE_INCOMPAT_FLEX_BG		0x0200
 + #define EXT4_FEATURE_INCOMPAT_EA_INODE		0x0400
 + #define EXT4_FEATURE_INCOMPAT_DIRDATA		0x1000
@@ -7933,7 +7384,7 @@ index 0000000..158e3e9
 + 
 + #define EXT4_FEATURE_COMPAT_SUPP	EXT2_FEATURE_COMPAT_EXT_ATTR
 + #define EXT4_FEATURE_INCOMPAT_SUPP	(EXT4_FEATURE_INCOMPAT_FILETYPE| \
-+@@ -1283,7 +1285,8 @@
++@@ -1152,7 +1154,8 @@
 + 					 EXT4_FEATURE_INCOMPAT_FLEX_BG| \
 + 					 EXT4_FEATURE_INCOMPAT_EA_INODE| \
 + 					 EXT4_FEATURE_INCOMPAT_MMP| \
@@ -7943,7 +7394,7 @@ index 0000000..158e3e9
 + 
 + #define EXT4_FEATURE_RO_COMPAT_SUPP	(EXT4_FEATURE_RO_COMPAT_SPARSE_SUPER| \
 + 					 EXT4_FEATURE_RO_COMPAT_LARGE_FILE| \
-+@@ -1500,6 +1503,76 @@
++@@ -1369,6 +1372,76 @@
 +  */
 + #define ERR_BAD_DX_DIR	-75000
 + 
@@ -8020,7 +7471,7 @@ index 0000000..158e3e9
 + void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr,
 + 			ext4_group_t *blockgrpp, ext4_grpblk_t *offsetp);
 + 
-+@@ -1756,14 +1829,16 @@
++@@ -1606,14 +1679,16 @@
 + extern struct inode *ext4_create_inode(handle_t *handle,
 + 				       struct inode * dir, int mode);
 + extern int ext4_add_entry(handle_t *handle, struct dentry *dentry,
@@ -8040,7 +7491,7 @@ index 0000000..158e3e9
 + extern int ext4_add_dot_dotdot(handle_t *handle, struct inode *dir,
 + 			       struct inode *inode, const void *, const void *);
 + extern struct buffer_head *ext4_append(handle_t *handle,
-+@@ -1875,13 +1950,15 @@
++@@ -1723,13 +1798,15 @@
 + 	es->s_r_blocks_count_hi = cpu_to_le32(blk >> 32);
 + }
 + 
@@ -8060,10 +7511,10 @@ index 0000000..158e3e9
 + }
 + 
 + static inline void ext4_isize_set(struct ext4_inode *raw_inode, loff_t i_size)
-+Index: linux-source-2.6.32/fs/ext4/namei.c
++Index: linux-2.6-2.6.32/fs/ext4/namei.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/namei.c	2012-07-05 11:45:17.823217452 +0200
-++++ linux-source-2.6.32/fs/ext4/namei.c	2012-07-05 11:45:24.542716615 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/namei.c	2012-08-24 11:09:04.917031723 +0200
+++++ linux-2.6-2.6.32/fs/ext4/namei.c	2012-08-24 11:09:17.948868803 +0200
 +@@ -176,7 +176,7 @@
 + 				 struct inode *dir,
 + 				 struct dx_hash_info *hinfo,
@@ -8344,27 +7795,28 @@ index 0000000..158e3e9
 + 	if (!(bh = ext4_bread (NULL,dir, 0, 0, err)))
 + 		goto fail;
 + 	info = dx_get_dx_info((struct ext4_dir_entry_2*)bh->b_data);
-+@@ -443,10 +661,16 @@
++@@ -442,10 +660,16 @@
 + 		goto fail;
 + 	}
 + 
 +-	if ((indirect = info->indirect_levels) > 1) {
-++	indirect = info->indirect_levels;
-++	if (indirect >= ext4_dir_htree_level(dir->i_sb)) {
-+ 		ext4_warning(dir->i_sb, __func__,
++-		ext4_warning(dir->i_sb, __func__,
 +-			     "Unimplemented inode hash depth: %#06x",
 +-			     info->indirect_levels);
-++		"Directory (ino: %lu) htree depth %#06x exceed "
-++		"supported value", dir->i_ino,
-++		ext4_dir_htree_level(dir->i_sb));
+++	indirect = info->indirect_levels;
+++	if (indirect >= ext4_dir_htree_level(dir->i_sb)) {
+++		ext4_warning(dir->i_sb,
+++			     "Directory (ino: %lu) htree depth %#06x exceed "
+++			     "supported value", dir->i_ino,
+++			     ext4_dir_htree_level(dir->i_sb));
 ++		if (ext4_dir_htree_level(dir->i_sb) < EXT4_HTREE_LEVEL) {
-++			ext4_warning(dir->i_sb, __func__, "Enable large directory "
-++			"feature to access it");
+++			ext4_warning(dir->i_sb, "Enable large directory "
+++						"feature to access it");
 ++		}
 + 		brelse(bh);
 + 		*err = ERR_BAD_DX_DIR;
 + 		goto fail;
-+@@ -467,8 +691,15 @@
++@@ -466,8 +690,15 @@
 + 	dxtrace(printk("Look up %x", hash));
 + 	while (1)
 + 	{
@@ -8381,7 +7833,7 @@ index 0000000..158e3e9
 + 			ext4_warning(dir->i_sb, __func__,
 + 				     "dx entry: no count or count > limit");
 + 			brelse(bh);
-+@@ -509,9 +740,73 @@
++@@ -508,9 +739,73 @@
 + 		frame->bh = bh;
 + 		frame->entries = entries;
 + 		frame->at = at;
@@ -8456,7 +7908,7 @@ index 0000000..158e3e9
 + 		at = entries = ((struct dx_node *) bh->b_data)->entries;
 + 		if (dx_get_limit(entries) != dx_node_limit (dir)) {
 + 			ext4_warning(dir->i_sb, __func__,
-+@@ -539,13 +834,18 @@
++@@ -538,13 +833,18 @@
 + static void dx_release (struct dx_frame *frames)
 + {
 + 	struct dx_root_info *info;
@@ -8478,7 +7930,7 @@ index 0000000..158e3e9
 + }
 + 
 + /*
-+@@ -568,7 +868,7 @@
++@@ -567,7 +867,7 @@
 + static int ext4_htree_next_block(struct inode *dir, __u32 hash,
 + 				 struct dx_frame *frame,
 + 				 struct dx_frame *frames,
@@ -8487,7 +7939,7 @@ index 0000000..158e3e9
 + {
 + 	struct dx_frame *p;
 + 	struct buffer_head *bh;
-+@@ -583,12 +883,22 @@
++@@ -582,12 +882,22 @@
 + 	 * this loop, num_frames indicates the number of interior
 + 	 * nodes need to be read.
 + 	 */
@@ -8512,7 +7964,7 @@ index 0000000..158e3e9
 + 		p--;
 + 	}
 + 
-+@@ -611,6 +921,13 @@
++@@ -610,6 +920,13 @@
 + 	 * block so no check is necessary
 + 	 */
 + 	while (num_frames--) {
@@ -8526,7 +7978,7 @@ index 0000000..158e3e9
 + 		if (!(bh = ext4_bread(NULL, dir, dx_get_block(p->at),
 + 				      0, &err)))
 + 			return err; /* Failure */
-+@@ -619,6 +936,7 @@
++@@ -618,6 +935,7 @@
 + 		p->bh = bh;
 + 		p->at = p->entries = ((struct dx_node *) bh->b_data)->entries;
 + 	}
@@ -8534,7 +7986,7 @@ index 0000000..158e3e9
 + 	return 1;
 + }
 + 
-+@@ -688,7 +1006,7 @@
++@@ -687,7 +1005,7 @@
 + {
 + 	struct dx_hash_info hinfo;
 + 	struct ext4_dir_entry_2 *de;
@@ -8543,7 +7995,7 @@ index 0000000..158e3e9
 + 	struct inode *dir;
 + 	ext4_lblk_t block;
 + 	int count = 0;
-+@@ -711,10 +1029,10 @@
++@@ -710,10 +1028,10 @@
 + 	}
 + 	hinfo.hash = start_hash;
 + 	hinfo.minor_hash = 0;
@@ -8556,7 +8008,7 @@ index 0000000..158e3e9
 + 	/* Add '.' and '..' from the htree header */
 + 	if (!start_hash && !start_minor_hash) {
 + 		de = (struct ext4_dir_entry_2 *) frames[0].bh->b_data;
-+@@ -741,7 +1059,7 @@
++@@ -740,7 +1058,7 @@
 + 		count += ret;
 + 		hashval = ~0;
 + 		ret = ext4_htree_next_block(dir, HASH_NB_ALWAYS,
@@ -8565,7 +8017,7 @@ index 0000000..158e3e9
 + 		*next_hash = hashval;
 + 		if (ret < 0) {
 + 			err = ret;
-+@@ -841,9 +1159,17 @@
++@@ -840,9 +1158,17 @@
 + 
 + static void ext4_update_dx_flag(struct inode *inode)
 + {
@@ -8578,12 +8030,12 @@ index 0000000..158e3e9
 ++#if 0
 + 	if (!EXT4_HAS_COMPAT_FEATURE(inode->i_sb,
 + 				     EXT4_FEATURE_COMPAT_DIR_INDEX))
-+ 		ext4_clear_inode_flag(inode, EXT4_INODE_INDEX);
++ 		EXT4_I(inode)->i_flags &= ~EXT4_INDEX_FL;
 ++#endif
 + }
 + 
 + /*
-+@@ -916,8 +1242,9 @@
++@@ -915,8 +1241,9 @@
 +  * to brelse() it when appropriate.
 +  */
 + struct buffer_head * ext4_find_entry(struct inode *dir,
@@ -8595,7 +8047,7 @@ index 0000000..158e3e9
 + {
 + 	struct super_block *sb;
 + 	struct buffer_head *bh_use[NAMEI_RA_SIZE];
-+@@ -938,7 +1265,7 @@
++@@ -937,7 +1264,7 @@
 + 	if (namelen > EXT4_NAME_LEN)
 + 		return NULL;
 + 	if (is_dx(dir)) {
@@ -8604,7 +8056,7 @@ index 0000000..158e3e9
 + 		/*
 + 		 * On success, or if the error was file not found,
 + 		 * return.  Otherwise, fall back to doing a search the
-+@@ -948,6 +1275,7 @@
++@@ -947,6 +1274,7 @@
 + 			return bh;
 + 		dxtrace(printk(KERN_DEBUG "ext4_find_entry: dx failed, "
 + 			       "falling back\n"));
@@ -8612,7 +8064,7 @@ index 0000000..158e3e9
 + 	}
 + 	nblocks = dir->i_size >> EXT4_BLOCK_SIZE_BITS(sb);
 + 	start = EXT4_I(dir)->i_dir_start_lookup;
-+@@ -1026,13 +1354,15 @@
++@@ -1025,13 +1353,15 @@
 + }
 + EXPORT_SYMBOL(ext4_find_entry);
 + 
@@ -8631,7 +8083,7 @@ index 0000000..158e3e9
 + 	struct ext4_dir_entry_2 *de, *top;
 + 	struct buffer_head *bh;
 + 	ext4_lblk_t block;
-+@@ -1043,13 +1373,16 @@
++@@ -1042,13 +1372,16 @@
 + 	sb = dir->i_sb;
 + 	/* NFS may look up ".." - look at dx_root directory block */
 + 	if (namelen > 2 || name[0] != '.'||(name[1] != '.' && name[1] != '\0')){
@@ -8649,7 +8101,7 @@ index 0000000..158e3e9
 + 	}
 + 	hash = hinfo.hash;
 + 	do {
-+@@ -1078,7 +1411,7 @@
++@@ -1077,7 +1410,7 @@
 + 		brelse(bh);
 + 		/* Check to see if we should continue to search */
 + 		retval = ext4_htree_next_block(dir, hash, frame,
@@ -8658,7 +8110,7 @@ index 0000000..158e3e9
 + 		if (retval < 0) {
 + 			ext4_warning(sb, __func__,
 + 			     "error reading index page in directory #%lu",
-+@@ -1104,7 +1437,7 @@
++@@ -1103,7 +1436,7 @@
 + 	if (dentry->d_name.len > EXT4_NAME_LEN)
 + 		return ERR_PTR(-ENAMETOOLONG);
 + 
@@ -8667,7 +8119,7 @@ index 0000000..158e3e9
 + 	inode = NULL;
 + 	if (bh) {
 + 		__u32 ino = le32_to_cpu(de->inode);
-+@@ -1173,7 +1506,7 @@
++@@ -1172,7 +1505,7 @@
 + 	struct ext4_dir_entry_2 * de;
 + 	struct buffer_head *bh;
 + 
@@ -8676,7 +8128,7 @@ index 0000000..158e3e9
 + 	inode = NULL;
 + 	if (!bh)
 + 		return ERR_PTR(-ENOENT);
-+@@ -1262,8 +1595,9 @@
++@@ -1261,8 +1594,9 @@
 +  * Returns pointer to de in block into which the new entry will be inserted.
 +  */
 + static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir,
@@ -8688,7 +8140,7 @@ index 0000000..158e3e9
 + {
 + 	unsigned blocksize = dir->i_sb->s_blocksize;
 + 	unsigned count, continued;
-+@@ -1320,7 +1654,14 @@
++@@ -1319,7 +1653,14 @@
 + 					hash2, split, count-split));
 + 
 + 	/* Fancy dance to stay within two buffers */
@@ -8704,7 +8156,7 @@ index 0000000..158e3e9
 + 	de = dx_pack_dirents(data1, blocksize);
 + 	de->rec_len = ext4_rec_len_to_disk(data1 + blocksize - (char *) de,
 + 					   blocksize);
-+@@ -1329,13 +1670,21 @@
++@@ -1328,13 +1669,21 @@
 + 	dxtrace(dx_show_leaf (hinfo, (struct ext4_dir_entry_2 *) data1, blocksize, 1));
 + 	dxtrace(dx_show_leaf (hinfo, (struct ext4_dir_entry_2 *) data2, blocksize, 1));
 + 
@@ -8732,7 +8184,7 @@ index 0000000..158e3e9
 + 	err = ext4_handle_dirty_metadata(handle, dir, bh2);
 + 	if (err)
 + 		goto journal_error;
-+@@ -1447,7 +1796,7 @@
++@@ -1454,7 +1803,7 @@
 + 	if (!IS_NOCMTIME(dir))
 + 		dir->i_mtime = dir->i_ctime = ext4_current_time(dir);
 + 	ext4_update_dx_flag(dir);
@@ -8741,7 +8193,7 @@ index 0000000..158e3e9
 + 	ext4_mark_inode_dirty(handle, dir);
 + 	BUFFER_TRACE(bh, "call ext4_handle_dirty_metadata");
 + 	err = ext4_handle_dirty_metadata(handle, dir, bh);
-+@@ -1467,7 +1816,7 @@
++@@ -1475,7 +1824,7 @@
 + 	const char	*name = dentry->d_name.name;
 + 	int		namelen = dentry->d_name.len;
 + 	struct buffer_head *bh2;
@@ -8750,7 +8202,7 @@ index 0000000..158e3e9
 + 	struct dx_entry *entries;
 + 	struct ext4_dir_entry_2 *de, *de2, *dot_de, *dotdot_de;
 + 	char		*data1, *top;
-+@@ -1545,7 +1894,7 @@
++@@ -1554,7 +1903,7 @@
 + 	frame->at = entries;
 + 	frame->bh = bh;
 + 	bh = bh2;
@@ -8759,7 +8211,7 @@ index 0000000..158e3e9
 + 	dx_release (frames);
 + 	if (!(de))
 + 		return retval;
-+@@ -1644,7 +1993,7 @@
++@@ -1651,7 +2000,7 @@
 +  * the entry, as someone else might have used it while you slept.
 +  */
 + int ext4_add_entry(handle_t *handle, struct dentry *dentry,
@@ -8768,7 +8220,7 @@ index 0000000..158e3e9
 + {
 + 	struct inode *dir = dentry->d_parent->d_inode;
 + 	struct buffer_head *bh;
-+@@ -1663,9 +2012,10 @@
++@@ -1670,9 +2019,10 @@
 + 		if (dentry->d_name.len == 2 &&
 + 		    memcmp(dentry->d_name.name, "..", 2) == 0)
 + 			return ext4_update_dotdot(handle, dentry, inode);
@@ -8777,10 +8229,10 @@ index 0000000..158e3e9
 + 		if (!retval || (retval != ERR_BAD_DX_DIR))
 + 			return retval;
 ++		ext4_htree_safe_relock(lck);
-+ 		ext4_clear_inode_flag(dir, EXT4_INODE_INDEX);
++ 		EXT4_I(dir)->i_flags &= ~EXT4_INDEX_FL;
 + 		dx_fallback++;
 + 		ext4_mark_inode_dirty(handle, dir);
-+@@ -1704,18 +2054,21 @@
++@@ -1705,18 +2055,21 @@
 +  * Returns 0 for success, or a negative error value
 +  */
 + static int ext4_dx_add_entry(handle_t *handle, struct dentry *dentry,
@@ -8805,20 +8257,23 @@ index 0000000..158e3e9
 + 	if (!frame)
 + 		return err;
 + 	entries = frame->entries;
-+@@ -1729,29 +2082,59 @@
-+ 	if (err)
-+ 		goto journal_error;
++@@ -1725,36 +2078,56 @@
++ 	if (!(bh = ext4_bread(handle,dir, dx_get_block(frame->at), 0, &err)))
++ 		goto cleanup;
 + 
-++	BUFFER_TRACE(bh, "get_write_access");
-++	err = ext4_journal_get_write_access(handle, bh);
-++	if (err)
-++		goto journal_error;
-++
++-	BUFFER_TRACE(bh, "get_write_access");
++-	err = ext4_journal_get_write_access(handle, bh);
++-	if (err)
++-		goto journal_error;
++-
 + 	err = add_dirent_to_buf(handle, dentry, inode, NULL, bh);
-+ 	if (err != -ENOSPC)
++ 	if (err != -ENOSPC) {
++ 		bh = NULL;
 + 		goto cleanup;
++ 	}
 + 
 ++	err = 0;
+++
 + 	/* Block full, should compress but for now just split */
 + 	dxtrace(printk(KERN_DEBUG "using %u of %u node entries\n",
 + 		       dx_get_count(entries), dx_get_limit(entries)));
@@ -8845,7 +8300,7 @@ index 0000000..158e3e9
 ++		}
 ++		while (frame > frames) {
 ++			if (dx_get_count((frame - 1)->entries) <
-++			    dx_get_limit((frame - 1)->entries)) {
+++					dx_get_limit((frame - 1)->entries)) {
 ++				add_level = 0;
 ++				break;
 ++			}
@@ -8854,13 +8309,12 @@ index 0000000..158e3e9
 ++			entries = frame->entries;
 ++			restart = 1;
 ++		}
-++		
 ++		if (add_level && levels == ext4_dir_htree_level(sb)) {
-++			ext4_warning(sb, __func__, "Directory (ino: %lu) index full, "
+++			ext4_warning(sb, "Directory (ino: %lu) index full, "
 ++					 "reach max htree level :%d",
 ++					 dir->i_ino, levels);
 ++			if (ext4_dir_htree_level(sb) < EXT4_HTREE_LEVEL) {
-++				ext4_warning(sb, __func__, "Large directory feature is"
+++				ext4_warning(sb, "Large directory feature is"
 ++						 "not enabled on this "
 ++						 "filesystem");
 ++			}
@@ -8871,7 +8325,7 @@ index 0000000..158e3e9
 + 		bh2 = ext4_append (handle, dir, &newblock, &err);
 + 		if (!(bh2))
 + 			goto cleanup;
-+@@ -1764,7 +2147,7 @@
++@@ -1767,7 +2140,7 @@
 + 		err = ext4_journal_get_write_access(handle, frame->bh);
 + 		if (err)
 + 			goto journal_error;
@@ -8880,7 +8334,7 @@ index 0000000..158e3e9
 + 			unsigned icount1 = icount/2, icount2 = icount - icount1;
 + 			unsigned hash2 = dx_get_hash(entries + icount1);
 + 			dxtrace(printk(KERN_DEBUG "Split index %i/%i\n",
-+@@ -1772,7 +2155,7 @@
++@@ -1775,7 +2148,7 @@
 + 
 + 			BUFFER_TRACE(frame->bh, "get_write_access"); /* index root */
 + 			err = ext4_journal_get_write_access(handle,
@@ -8889,7 +8343,7 @@ index 0000000..158e3e9
 + 			if (err)
 + 				goto journal_error;
 + 
-+@@ -1788,18 +2171,24 @@
++@@ -1791,18 +2164,24 @@
 + 				frame->entries = entries = entries2;
 + 				swap(frame->bh, bh2);
 + 			}
@@ -8918,7 +8372,7 @@ index 0000000..158e3e9
 + 			memcpy((char *) entries2, (char *) entries,
 + 			       icount * sizeof(struct dx_entry));
 + 			dx_set_limit(entries2, dx_node_limit(dir));
-+@@ -1809,32 +2198,60 @@
++@@ -1812,21 +2191,43 @@
 + 			dx_set_block(entries + 0, newblock);
 + 			info = dx_get_dx_info((struct ext4_dir_entry_2*)
 + 					frames[0].bh->b_data);
@@ -8959,8 +8413,8 @@ index 0000000..158e3e9
 ++		 * ld->ld_count if nobody split any DE-block under @at,
 ++		 * and ld->ld_at still points to valid dx_entry. */
 ++		if ((ld->ld_count != dx_get_count(entries)) ||
-++		    !ext4_htree_dx_lock_try(lck, at) ||
-++		    (ld->ld_count != dx_get_count(entries))) {
+++			!ext4_htree_dx_lock_try(lck, at) ||
+++			(ld->ld_count != dx_get_count(entries))) {
 ++			restart = 1;
 ++			goto cleanup;
 + 		}
@@ -8970,12 +8424,11 @@ index 0000000..158e3e9
 + 	}
 +-	de = do_split(handle, dir, &bh, frame, &hinfo, &err);
 ++	de = do_split(handle, dir, &bh, frames, frame, &hinfo, lck, &err);
+++
 + 	if (!de)
 + 		goto cleanup;
-++
 + 	err = add_dirent_to_buf(handle, dentry, inode, de, bh);
-+ 	goto cleanup;
-+ 
++@@ -1836,9 +2237,15 @@
 + journal_error:
 + 	ext4_std_error(dir->i_sb, err);
 + cleanup:
@@ -8991,7 +8444,7 @@ index 0000000..158e3e9
 + 	return err;
 + }
 + 
-+@@ -1869,7 +2286,7 @@
++@@ -1873,7 +2280,7 @@
 + 					blocksize);
 + 			else
 + 				de->inode = 0;
@@ -9000,7 +8453,7 @@ index 0000000..158e3e9
 + 			BUFFER_TRACE(bh, "call ext4_handle_dirty_metadata");
 + 			ext4_handle_dirty_metadata(handle, dir, bh);
 + 			return 0;
-+@@ -1912,7 +2329,7 @@
++@@ -1916,7 +2323,7 @@
 + static int ext4_add_nondir(handle_t *handle,
 + 		struct dentry *dentry, struct inode *inode)
 + {
@@ -9009,7 +8462,7 @@ index 0000000..158e3e9
 + 	if (!err) {
 + 		ext4_mark_inode_dirty(handle, inode);
 + 		d_instantiate(dentry, inode);
-+@@ -2142,7 +2559,7 @@
++@@ -2145,7 +2552,7 @@
 + 		goto out_stop;
 + 	}
 + 
@@ -9018,7 +8471,7 @@ index 0000000..158e3e9
 + 	if (err) {
 + 		clear_nlink(inode);
 + 		unlock_new_inode(inode);
-+@@ -2411,7 +2828,7 @@
++@@ -2406,7 +2813,7 @@
 + 		return PTR_ERR(handle);
 + 
 + 	retval = -ENOENT;
@@ -9027,7 +8480,7 @@ index 0000000..158e3e9
 + 	if (!bh)
 + 		goto end_rmdir;
 + 
-+@@ -2473,7 +2890,7 @@
++@@ -2468,7 +2875,7 @@
 + 		ext4_handle_sync(handle);
 + 
 + 	retval = -ENOENT;
@@ -9036,7 +8489,7 @@ index 0000000..158e3e9
 + 	if (!bh)
 + 		goto end_unlink;
 + 
-+@@ -2597,7 +3014,7 @@
++@@ -2592,7 +2999,7 @@
 + 	ext4_inc_count(handle, inode);
 + 	atomic_inc(&inode->i_count);
 + 
@@ -9045,7 +8498,7 @@ index 0000000..158e3e9
 + 	if (!err) {
 + 		ext4_mark_inode_dirty(handle, inode);
 + 		d_instantiate(dentry, inode);
-+@@ -2642,7 +3059,7 @@
++@@ -2637,7 +3044,7 @@
 + 	if (IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir))
 + 		ext4_handle_sync(handle);
 + 
@@ -9054,7 +8507,7 @@ index 0000000..158e3e9
 + 	/*
 + 	 *  Check for inode number is _not_ due to possible IO errors.
 + 	 *  We might rmdir the source, keep it as pwd of some process
-+@@ -2655,7 +3072,7 @@
++@@ -2650,7 +3057,7 @@
 + 		goto end_rename;
 + 
 + 	new_inode = new_dentry->d_inode;
@@ -9063,7 +8516,7 @@ index 0000000..158e3e9
 + 	if (new_bh) {
 + 		if (!new_inode) {
 + 			brelse(new_bh);
-+@@ -2681,7 +3098,7 @@
++@@ -2676,7 +3083,7 @@
 + 			goto end_rename;
 + 	}
 + 	if (!new_bh) {
@@ -9072,7 +8525,7 @@ index 0000000..158e3e9
 + 		if (retval)
 + 			goto end_rename;
 + 	} else {
-+@@ -2723,7 +3140,8 @@
++@@ -2718,7 +3125,8 @@
 + 		struct buffer_head *old_bh2;
 + 		struct ext4_dir_entry_2 *old_de2;
 + 
@@ -9082,23 +8535,23 @@ index 0000000..158e3e9
 + 		if (old_bh2) {
 + 			retval = ext4_delete_entry(handle, old_dir,
 + 						   old_de2, old_bh2);
-+Index: linux-source-2.6.32/fs/ext4/inode.c
++Index: linux-2.6-2.6.32/fs/ext4/inode.c
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/inode.c	2012-07-05 11:44:41.042715759 +0200
-++++ linux-source-2.6.32/fs/ext4/inode.c	2012-07-05 11:45:24.542716615 +0200
-+@@ -4923,7 +4923,7 @@
++--- linux-2.6-2.6.32.orig/fs/ext4/inode.c	2012-08-23 15:31:05.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/inode.c	2012-08-24 11:09:17.953868740 +0200
++@@ -4840,7 +4840,7 @@
 + 	if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_64BIT))
 + 		ei->i_file_acl |=
 + 			((__u64)le16_to_cpu(raw_inode->i_file_acl_high)) << 32;
 +-	inode->i_size = ext4_isize(raw_inode);
 ++	inode->i_size = ext4_isize(sb, raw_inode);
 + 	ei->i_disksize = inode->i_size;
-+ #ifdef CONFIG_QUOTA
-+ 	ei->i_reserved_quota = 0;
-+Index: linux-source-2.6.32/fs/ext4/Makefile
++ 	inode->i_generation = le32_to_cpu(raw_inode->i_generation);
++ 	ei->i_block_group = iloc.block_group;
++Index: linux-2.6-2.6.32/fs/ext4/Makefile
 +===================================================================
-+--- linux-source-2.6.32.orig/fs/ext4/Makefile	2012-07-05 11:44:53.591707738 +0200
-++++ linux-source-2.6.32/fs/ext4/Makefile	2012-07-05 11:45:24.542716615 +0200
++--- linux-2.6-2.6.32.orig/fs/ext4/Makefile	2012-08-24 09:50:41.000000000 +0200
+++++ linux-2.6-2.6.32/fs/ext4/Makefile	2012-08-24 11:09:17.959868665 +0200
 +@@ -7,7 +7,7 @@
 + ext4-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
 + 		ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \
@@ -9108,47 +8561,46 @@ index 0000000..158e3e9
 + 
 + ext4-$(CONFIG_EXT4_FS_XATTR)		+= xattr.o xattr_user.o xattr_trusted.o
 + ext4-$(CONFIG_EXT4_FS_POSIX_ACL)	+= acl.o
-diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6.32-vanilla.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6.32-vanilla.series
+diff --git a/ldiskfs/kernel_patches/series/2.6.32-squeeze.series b/ldiskfs/kernel_patches/series/2.6.32-squeeze.series
 new file mode 100644
-index 0000000..b1eff79
+index 0000000..6f51b97
 --- /dev/null
-+++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6.32-vanilla.series
-@@ -0,0 +1,38 @@
-+ext4-wantedi-2.6.32-vanilla.patch
-+ext4-map_inode_page-2.6.32-vanilla.patch
-+export-ext4-2.6.32-vanilla.patch
-+ext4-remove-cond_resched-calls-2.6.32-vanilla.patch
-+ext4-nlink-2.6.32-vanilla.patch
-+ext4-ext_generation-2.6.32-vanilla.patch
-+ext4-inode-version-2.6.32-vanilla.patch
-+ext4-update-vanilla-2.6.32-vanilla.patch
-+ext4-mmp-2.6.32-vanilla.patch
-+ext4-lookup-dotdot-2.6.32-vanilla.patch
-+ext4-max-dir-size-2.6.32-vanilla.patch
-+ext4-print-inum-in-htree-warning-2.6.32-vanilla.patch
-+ext4-xattr-no-update-ctime-2.6.32-vanilla.patch
-+ext4-prealloc-2.6.32-vanilla.patch
-+ext4-mballoc-extra-checks-2.6.32-vanilla.patch
-+ext4-misc-2.6.32-vanilla.patch 
-+ext4-big-endian-check-2.6.32-vanilla.patch
-+ext4-alloc-policy-2.6.32-vanilla.patch
-+ext4-force_over_128tb-2.6.32-vanilla.patch
-+ext4-pdir-fix-2.6.32-vanilla.patch
-+ext4-osd-iop-common-2.6.32-vanilla.patch
-+ext4-osd-iam-exports-2.6.32-vanilla.patch
-+ext4-dynlocks-common-2.6.32-vanilla.patch
-+ext4-hash-indexed-dir-dotdot-update-2.6.32-vanilla.patch
-+ext4-kill-dx_root-2.6.32-vanilla.patch
-+ext4-extents-mount-option-2.6.32-vanilla.patch
-+ext4-fiemap-2.6.32-vanilla.patch
-+ext4-mballoc-pa_free-mismatch-2.6.32-vanilla.patch
-+ext4_data_in_dirent-2.6.32-vanilla.patch
-+ext4-large-eas-2.6.32-vanilla.patch
-+ext4-disable-mb-cache-2.6.32-vanilla.patch
-+ext4-back-dquot-to-2.6.32-vanilla.patch
-+ext4-nocmtime-2.6.32-vanilla.patch
-+ext4-export-64bit-name-hash-2.6.32-vanilla.patch
-+ext4-vmalloc-2.6.32-vanilla.patch
-+ext4-journal-callback-2.6.32-vanilla.patch
-+ext4-store-tree-generation-at-find-2.6.32-vanilla.patch
-+ext4_pdirop-2.6.32-vanilla.patch
++++ b/ldiskfs/kernel_patches/series/2.6.32-squeeze.series
+@@ -0,0 +1,37 @@
++ext4-wantedi-2.6-squeeze.patch
++ext4-map_inode_page-2.6.18-squeeze.patch
++export-ext4-2.6-squeeze.patch
++ext4-remove-cond_resched-calls-squeeze.patch
++ext4-nlink-2.6-squeeze.patch
++ext4-ext_generation-squeeze.patch
++ext4-inode-version-squeeze.patch
++ext4-mmp-squeeze.patch
++ext4-lookup-dotdot-squeeze.patch
++ext4-max-dir-size-squeeze.patch
++ext4-print-inum-in-htree-warning-squeeze.patch
++ext4-xattr-no-update-ctime-squeeze.patch
++ext4-prealloc-squeeze.patch
++ext4-mballoc-extra-checks-squeeze.patch
++ext4-misc-squeeze.patch
++ext4-big-endian-check-2.6-squeeze.patch
++ext4-alloc-policy-2.6-squeeze.patch
++ext4-force_over_128tb-squeeze.patch
++ext4-pdir-fix-squeeze.patch
++ext4-osd-iop-common-squeeze.patch
++ext4-osd-iam-exports-squeeze.patch
++ext4-dynlocks-common-squeeze.patch
++ext4-hash-indexed-dir-dotdot-update-squeeze.patch
++ext4-kill-dx_root-squeeze.patch
++ext4-extents-mount-option-squeeze.patch
++ext4-fiemap-2.6-squeeze.patch
++ext4-mballoc-pa_free-mismatch-squeeze.patch
++ext4_data_in_dirent-squeeze.patch
++ext4-large-eas-squeeze.patch
++ext4-disable-mb-cache-squeeze.patch
++ext4-back-dquot-to-squeeze.patch
++ext4-nocmtime-2.6-squeeze.patch
++ext4-export-64bit-name-hash-squeeze.patch
++ext4-vmalloc-squeeze.patch
++ext4-journal-callback-squeeze.patch
++ext4-store-tree-generation-at-find-squeeze.patch
++ext4_pdirop-squeeze.patch

-- 
Lustre Debian Packaging 



More information about the Pkg-lustre-svn-commit mailing list