-Index: linux-2.6.27.21-0.1/fs/ext4/ext4_jbd2.h
+Index: linux-stage/fs/ext4/ext4_jbd2.h
===================================================================
---- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_jbd2.h 2009-07-07 14:47:19.000000000 +0530
-+++ linux-2.6.27.21-0.1/fs/ext4/ext4_jbd2.h 2009-07-07 14:47:22.000000000 +0530
+--- linux-stage.orig/fs/ext4/ext4_jbd2.h
++++ linux-stage/fs/ext4/ext4_jbd2.h
@@ -35,6 +35,11 @@
- (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \
- || test_opt(sb, EXTENTS) ? 27U : 8U)
+ (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS) \
+ ? 27U : 8U)
+/* Indicate that EXT4_SINGLEDATA_TRANS_BLOCKS takes the sb as argument */
+#define EXT4_SINGLEDATA_TRANS_BLOCKS_HAS_SB
/* 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-2.6.27.21-0.1/fs/ext4/extents.c
+Index: linux-stage/fs/ext4/extents.c
===================================================================
---- linux-2.6.27.21-0.1.orig/fs/ext4/extents.c 2009-07-07 14:47:19.000000000 +0530
-+++ linux-2.6.27.21-0.1/fs/ext4/extents.c 2009-07-07 14:48:03.000000000 +0530
-@@ -58,6 +58,17 @@
+--- linux-stage.orig/fs/ext4/extents.c
++++ linux-stage/fs/ext4/extents.c
+@@ -59,6 +59,17 @@ ext4_fsblk_t ext_pblock(struct ext4_exte
}
/*
* idx_pblock:
* combine low and high parts of a leaf physical block number into ext4_fsblk_t
*/
-@@ -71,17 +82,6 @@
+@@ -72,17 +83,6 @@ ext4_fsblk_t idx_pblock(struct ext4_exte
}
/*
* ext4_idx_store_pblock:
* stores a large physical block number into an index struct,
* breaking it into parts
-@@ -1852,6 +1852,56 @@
+@@ -1994,6 +1994,56 @@ static int ext4_ext_rm_idx(handle_t *han
}
/*
* ext4_ext_calc_credits_for_single_extent:
* This routine returns max. credits that needed to insert an extent
* to the extent tree.
-@@ -3171,3 +3221,14 @@
+@@ -3883,3 +3933,14 @@ int ext4_fiemap(struct inode *inode, str
return error;
}
-
+
+
+EXPORT_SYMBOL(ext4_ext_store_pblock);
+EXPORT_SYMBOL(ext4_ext_search_right);
+EXPORT_SYMBOL(ext4_mark_inode_dirty);
+EXPORT_SYMBOL(ext4_ext_walk_space);
+
-Index: linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h
+Index: linux-stage/fs/ext4/ext4_extents.h
===================================================================
---- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_extents.h 2009-07-07 14:47:19.000000000 +0530
-+++ linux-2.6.27.21-0.1/fs/ext4/ext4_extents.h 2009-07-07 14:47:22.000000000 +0530
-@@ -59,6 +59,11 @@
+--- linux-stage.orig/fs/ext4/ext4_extents.h
++++ linux-stage/fs/ext4/ext4_extents.h
+@@ -58,6 +58,11 @@
*/
#define EXT_STATS_
/*
* ext4_inode has i_block array (60 bytes total).
-@@ -124,6 +129,8 @@
+@@ -123,6 +128,8 @@ struct ext4_ext_path {
#define EXT4_EXT_CACHE_GAP 1
#define EXT4_EXT_CACHE_EXTENT 2
/*
* to be called by ext4_ext_walk_space()
* negative retcode - error
-@@ -223,6 +229,8 @@
+@@ -231,6 +238,8 @@ extern ext4_fsblk_t ext_pblock(struct ex
extern ext4_fsblk_t idx_pblock(struct ext4_extent_idx *);
extern void ext4_ext_store_pblock(struct ext4_extent *, ext4_fsblk_t);
extern int ext4_extent_tree_init(handle_t *, struct inode *);
extern int ext4_ext_calc_credits_for_single_extent(struct inode *inode,
int num,
struct ext4_ext_path *path);
-Index: linux-2.6.27.21-0.1/fs/ext4/mballoc.c
+Index: linux-stage/fs/ext4/mballoc.c
===================================================================
---- linux-2.6.27.21-0.1.orig/fs/ext4/mballoc.c 2009-07-07 14:47:19.000000000 +0530
-+++ linux-2.6.27.21-0.1/fs/ext4/mballoc.c 2009-07-07 14:47:22.000000000 +0530
-@@ -4355,6 +4355,13 @@
+--- linux-stage.orig/fs/ext4/mballoc.c
++++ linux-stage/fs/ext4/mballoc.c
+@@ -4071,6 +4071,13 @@ repeat:
kmem_cache_free(ext4_ac_cachep, ac);
}
/*
* finds all preallocated spaces and return blocks being freed to them
* if preallocated space becomes full (no block is used from the space)
-@@ -5177,3 +5184,6 @@
+@@ -4863,3 +4870,6 @@ error_return:
kmem_cache_free(ext4_ac_cachep, ac);
return;
}
+
+EXPORT_SYMBOL(ext4_free_blocks);
+
-Index: linux-2.6.27.21-0.1/fs/ext4/super.c
+Index: linux-stage/fs/ext4/super.c
===================================================================
---- linux-2.6.27.21-0.1.orig/fs/ext4/super.c 2009-07-07 14:47:19.000000000 +0530
-+++ linux-2.6.27.21-0.1/fs/ext4/super.c 2009-07-07 14:48:53.000000000 +0530
-@@ -91,6 +91,7 @@
+--- linux-stage.orig/fs/ext4/super.c
++++ linux-stage/fs/ext4/super.c
+@@ -90,6 +90,7 @@ ext4_fsblk_t ext4_inode_bitmap(struct su
(EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ?
(ext4_fsblk_t)le32_to_cpu(bg->bg_inode_bitmap_hi) << 32 : 0);
}
ext4_fsblk_t ext4_inode_table(struct super_block *sb,
struct ext4_group_desc *bg)
-@@ -1286,6 +1287,7 @@
- Opt_inode_readahead_blks, Opt_journal_ioprio,
- Opt_discard, Opt_nodiscard, Opt_bigendian_extents,
- Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
+@@ -1454,6 +1455,7 @@ enum {
+ Opt_inode_readahead_blks, Opt_journal_ioprio,
+ Opt_discard, Opt_nodiscard, Opt_bigendian_extents,
+ Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
+ Opt_mballoc, Opt_extents,
};
-
-@@ -1346,6 +1348,8 @@
- {Opt_discard, "discard"},
- {Opt_nodiscard, "nodiscard"},
- {Opt_bigendian_extents, "bigendian_extents"},
+ static const match_table_t tokens = {
+@@ -1525,6 +1527,8 @@ static const match_table_t tokens = {
+ {Opt_discard, "discard"},
+ {Opt_nodiscard, "nodiscard"},
+ {Opt_bigendian_extents, "bigendian_extents"},
+ {Opt_extents, "extents"},
+ {Opt_mballoc, "mballoc"},
- {Opt_err, NULL},
+ {Opt_err, NULL},
};
-@@ -1768,6 +1771,9 @@
+@@ -1974,6 +1978,9 @@ set_qf_format:
case Opt_bigendian_extents:
bigendian_extents = 1;
break;
+ case Opt_extents:
+ break;
default:
- ext4_msg(sb, KERN_ERR,
- "Unrecognized mount option \"%s\" "
-@@ -1968,7 +1971,7 @@
- ext4_commit_super(sb, 1);
- if (test_opt(sb, DEBUG))
- printk(KERN_INFO "[EXT4 FS bs=%lu, gc=%u, "
+ ext4_msg(sb, KERN_ERR,
+ "Unrecognized mount option \"%s\" "
+@@ -2062,7 +2069,7 @@ static int ext4_setup_super(struct super
+ ext4_commit_super(sb, 1);
+ if (test_opt(sb, DEBUG))
+ printk(KERN_INFO "[EXT4 FS bs=%lu, gc=%u, "
- "bpg=%lu, ipg=%lu, mo=%04x]\n",
+ "bpg=%lu, ipg=%lu, mo=%04llx]\n",
- sb->s_blocksize,
- sbi->s_groups_count,
- EXT4_BLOCKS_PER_GROUP(sb),
-Index: linux-2.6.27.21-0.1/fs/ext4/ext4_jbd2.c
+ sb->s_blocksize,
+ sbi->s_groups_count,
+ EXT4_BLOCKS_PER_GROUP(sb),
+Index: linux-stage/fs/ext4/ext4_jbd2.c
===================================================================
---- linux-2.6.27.21-0.1.orig/fs/ext4/ext4_jbd2.c 2009-07-07 14:47:19.000000000 +0530
-+++ linux-2.6.27.21-0.1/fs/ext4/ext4_jbd2.c 2009-07-07 14:47:22.000000000 +0530
-@@ -21,6 +21,7 @@
- ext4_journal_abort_handle(where, __func__, bh, handle, err);
+--- linux-stage.orig/fs/ext4/ext4_jbd2.c
++++ linux-stage/fs/ext4/ext4_jbd2.c
+@@ -31,6 +31,7 @@ int __ext4_journal_get_write_access(cons
+ }
return err;
}
+EXPORT_SYMBOL(__ext4_journal_get_write_access);
int __ext4_journal_forget(const char *where, handle_t *handle,
struct buffer_head *bh)
-@@ -57,3 +58,4 @@
- ext4_journal_abort_handle(where, __func__, bh, handle, err);
+@@ -107,3 +108,4 @@ int __ext4_handle_dirty_metadata(const c
+ }
return err;
}
+EXPORT_SYMBOL(__ext4_handle_dirty_metadata);
-Index: linux-2.6.27.21-0.1/fs/ext4/ext4.h
+Index: linux-stage/fs/ext4/ext4.h
===================================================================
---- linux-2.6.27.21-0.1.orig/fs/ext4/ext4.h 2009-07-07 14:47:19.000000000 +0530
-+++ linux-2.6.27.21-0.1/fs/ext4/ext4.h 2009-07-07 14:47:22.000000000 +0530
-@@ -26,6 +26,11 @@
+--- linux-stage.orig/fs/ext4/ext4.h
++++ linux-stage/fs/ext4/ext4.h
+@@ -37,6 +37,11 @@
* The fourth extended filesystem constants/structures
*/
/*
* Define EXT4FS_DEBUG to produce debug messages
*/
-@@ -425,7 +425,7 @@
+@@ -501,7 +506,7 @@ struct ext4_new_group_data {
* Mount options
*/
struct ext4_mount_options {
uid_t s_resuid;
gid_t s_resgid;
unsigned long s_commit_interval;
-@@ -1020,6 +1020,8 @@
-
+@@ -576,6 +581,8 @@ struct ext4_inode {
+ __le32 i_crtime_extra; /* extra FileCreationtime (nsec << 2 | epoch) */
__le32 i_version_hi; /* high 32 bits for 64-bit version */
};
+/* SLES11 kernel already has 64-bit inode->i_version field */
+#define HAVE_DISK_INODE_VERSION
struct move_extent {
- __u32 reserved; /* should be zero */
-@@ -1023,7 +1028,7 @@
- struct buffer_head * s_sbh; /* Buffer containing the super block */
- struct ldiskfs_super_block *s_es; /* Pointer to the super block in the buffer */
- struct buffer_head **s_group_desc;
+ __u32 reserved; /* should be zero */
+@@ -997,7 +1004,7 @@ struct ext4_sb_info {
+ struct buffer_head * s_sbh; /* Buffer containing the super block */
+ struct ext4_super_block *s_es; /* Pointer to the super block in the buffer */
+ struct buffer_head **s_group_desc;
- unsigned int s_mount_opt;
+ unsigned long long s_mount_opt; /* lustre need more options */
- unsigned int s_mount_flags;
- ldiskfs_fsblk_t s_sb_block;
- uid_t s_resuid;
-@@ -1123,6 +1128,8 @@
+ unsigned int s_mount_flags;
+ ext4_fsblk_t s_sb_block;
+ uid_t s_resuid;
+@@ -1582,6 +1589,8 @@ extern int ext4_mb_add_groupinfo(struct
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);
/* inode.c */
int ext4_forget(handle_t *handle, int is_metadata, struct inode *inode,
struct buffer_head *bh, ext4_fsblk_t blocknr);
-Index: linux-2.6.27.21-0.1/fs/ext4/inode.c
+Index: linux-stage/fs/ext4/inode.c
===================================================================
---- linux-2.6.27.21-0.1.orig/fs/ext4/inode.c 2009-07-07 14:47:19.000000000 +0530
-+++ linux-2.6.27.21-0.1/fs/ext4/inode.c 2009-07-07 14:47:22.000000000 +0530
-@@ -4240,6 +4240,7 @@
+--- linux-stage.orig/fs/ext4/inode.c
++++ linux-stage/fs/ext4/inode.c
+@@ -93,7 +93,7 @@ int ext4_forget(handle_t *handle, int is
+ BUFFER_TRACE(bh, "enter");
+
+ jbd_debug(4, "forgetting bh %p: is_metadata = %d, mode %o, "
+- "data mode %x\n",
++ "data mode %Lx\n",
+ bh, is_metadata, inode->i_mode,
+ test_opt(inode->i_sb, DATA_FLAGS));
+
+@@ -5055,6 +5055,7 @@ bad_inode:
iget_failed(inode);
return ERR_PTR(ret);
}
static int ext4_inode_blocks_set(handle_t *handle,
struct ext4_inode *raw_inode,
---- /dev/null 2009-09-21 17:11:24.467285554 +0800
-+++ linux-2.6.27.21-0.1/fs/ext4/fiemap.h
+Index: linux-stage/fs/ext4/fiemap.h
+===================================================================
+--- /dev/null
++++ linux-stage/fs/ext4/fiemap.h
@@ -0,0 +1,3 @@
+
+#include_next <fiemap.h>
+
---- linux/fs/ext4/move_extent.c
-+++ linux/fs/ext4/move_extent.c
-@@ -483,7 +483,7 @@
-
- o_start = o_end = oext = orig_path[depth].p_ext;
- oext_alen = ext4_ext_get_actual_len(oext);
+Index: linux-stage/fs/ext4/move_extent.c
+===================================================================
+--- linux-stage.orig/fs/ext4/move_extent.c
++++ linux-stage/fs/ext4/move_extent.c
+@@ -483,7 +483,7 @@ mext_leaf_block(handle_t *handle, struct
+
+ o_start = o_end = oext = orig_path[depth].p_ext;
+ oext_alen = ext4_ext_get_actual_len(oext);
- start_ext.ee_len = end_ext.ee_len = 0;
+ start_ext.ee_block = start_ext.ee_len = end_ext.ee_len = 0;
-
- new_ext.ee_block = cpu_to_le32(*from);
- ext4_ext_store_pblock(&new_ext, ext_pblock(dext));
+
+ new_ext.ee_block = cpu_to_le32(*from);
+ ext4_ext_store_pblock(&new_ext, ext_pblock(dext));