-Index: linux-2.6.18/fs/ext3/ialloc.c
+Index: linux-2.6.18.8/fs/ext3/ialloc.c
===================================================================
---- linux-2.6.18.orig/fs/ext3/ialloc.c
-+++ linux-2.6.18/fs/ext3/ialloc.c
-@@ -615,7 +615,8 @@ got:
+--- linux-2.6.18.8.orig/fs/ext3/ialloc.c 2007-06-20 18:54:59.000000000 +0200
++++ linux-2.6.18.8/fs/ext3/ialloc.c 2007-06-20 18:54:59.000000000 +0200
+@@ -729,7 +729,8 @@ got:
/* This is the optimal IO size (for stat), not the fs block size */
inode->i_blksize = PAGE_SIZE;
inode->i_blocks = 0;
memset(ei->i_data, 0, sizeof(ei->i_data));
ei->i_dir_start_lookup = 0;
-@@ -647,9 +648,8 @@ got:
+@@ -761,9 +762,8 @@ got:
spin_unlock(&sbi->s_next_gen_lock);
ei->i_state = EXT3_STATE_NEW;
ret = inode;
if(DQUOT_ALLOC_INODE(inode)) {
-Index: linux-2.6.18/fs/ext3/inode.c
+Index: linux-2.6.18.8/fs/ext3/inode.c
===================================================================
---- linux-2.6.18.orig/fs/ext3/inode.c
-+++ linux-2.6.18/fs/ext3/inode.c
-@@ -729,7 +729,7 @@ static int ext3_splice_branch(handle_t *
+--- linux-2.6.18.8.orig/fs/ext3/inode.c 2007-06-20 18:54:52.000000000 +0200
++++ linux-2.6.18.8/fs/ext3/inode.c 2007-06-20 18:54:59.000000000 +0200
+@@ -727,7 +727,7 @@ static int ext3_splice_branch(handle_t *
/* We are done with atomic stuff, now do the rest of housekeeping */
ext3_mark_inode_dirty(handle, inode);
/* had we spliced it onto indirect block? */
-@@ -2388,7 +2388,7 @@ do_indirects:
+@@ -2375,7 +2375,7 @@ do_indirects:
ext3_discard_reservation(inode);
mutex_unlock(&ei->truncate_mutex);
ext3_mark_inode_dirty(handle, inode);
/*
-@@ -2624,10 +2624,6 @@ void ext3_read_inode(struct inode * inod
+@@ -2611,10 +2611,6 @@ void ext3_read_inode(struct inode * inod
}
inode->i_nlink = le16_to_cpu(raw_inode->i_links_count);
inode->i_size = le32_to_cpu(raw_inode->i_size);
ei->i_state = 0;
ei->i_dir_start_lookup = 0;
-@@ -2702,6 +2698,11 @@ void ext3_read_inode(struct inode * inod
+@@ -2689,6 +2685,11 @@ void ext3_read_inode(struct inode * inod
} else
ei->i_extra_isize = 0;
if (S_ISREG(inode->i_mode)) {
inode->i_op = &ext3_file_inode_operations;
inode->i_fop = &ext3_file_operations;
-@@ -2782,9 +2783,12 @@ static int ext3_do_update_inode(handle_t
+@@ -2769,9 +2770,12 @@ static int ext3_do_update_inode(handle_t
}
raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
raw_inode->i_size = cpu_to_le32(ei->i_disksize);
raw_inode->i_blocks = cpu_to_le32(inode->i_blocks);
raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
raw_inode->i_flags = cpu_to_le32(ei->i_flags);
-Index: linux-2.6.18/fs/ext3/ioctl.c
+Index: linux-2.6.18.8/fs/ext3/ioctl.c
===================================================================
---- linux-2.6.18.orig/fs/ext3/ioctl.c
-+++ linux-2.6.18/fs/ext3/ioctl.c
+--- linux-2.6.18.8.orig/fs/ext3/ioctl.c 2007-06-20 18:42:05.000000000 +0200
++++ linux-2.6.18.8/fs/ext3/ioctl.c 2007-06-20 18:54:59.000000000 +0200
@@ -120,7 +120,7 @@ int ext3_ioctl (struct inode * inode, st
ei->i_flags = flags;
err = ext3_mark_iloc_dirty(handle, inode, &iloc);
flags_err:
-@@ -161,7 +161,7 @@ flags_err:
+@@ -157,7 +157,7 @@ flags_err:
return PTR_ERR(handle);
err = ext3_reserve_inode_write(handle, inode, &iloc);
if (err == 0) {
inode->i_generation = generation;
err = ext3_mark_iloc_dirty(handle, inode, &iloc);
}
-Index: linux-2.6.18/fs/ext3/namei.c
+Index: linux-2.6.18.8/fs/ext3/namei.c
===================================================================
---- linux-2.6.18.orig/fs/ext3/namei.c
-+++ linux-2.6.18/fs/ext3/namei.c
+--- linux-2.6.18.8.orig/fs/ext3/namei.c 2007-06-20 18:54:53.000000000 +0200
++++ linux-2.6.18.8/fs/ext3/namei.c 2007-06-20 18:54:59.000000000 +0200
@@ -1287,7 +1287,7 @@ static int add_dirent_to_buf(handle_t *h
* happen is that the times are slightly out of date
* and/or different from the directory change time.
ext3_update_dx_flag(old_dir);
if (dir_bh) {
BUFFER_TRACE(dir_bh, "get_write_access");
-Index: linux-2.6.18/fs/ext3/super.c
+Index: linux-2.6.18.8/fs/ext3/super.c
===================================================================
---- linux-2.6.18.orig/fs/ext3/super.c
-+++ linux-2.6.18/fs/ext3/super.c
-@@ -1615,6 +1615,8 @@ static int ext3_fill_super (struct super
+--- linux-2.6.18.8.orig/fs/ext3/super.c 2007-06-20 18:54:59.000000000 +0200
++++ linux-2.6.18.8/fs/ext3/super.c 2007-06-20 18:54:59.000000000 +0200
+@@ -1713,6 +1713,8 @@ static int ext3_fill_super (struct super
sbi->s_inode_size);
goto failed_mount;
}
}
sbi->s_frag_size = EXT3_MIN_FRAG_SIZE <<
le32_to_cpu(es->s_log_frag_size);
-@@ -1819,6 +1821,32 @@ static int ext3_fill_super (struct super
+@@ -1917,6 +1919,32 @@ static int ext3_fill_super (struct super
}
ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
/*
* akpm: core read_super() calls in here with the superblock locked.
* That deadlocks, because orphan cleanup needs to lock the superblock
-Index: linux-2.6.18/fs/ext3/xattr.c
+Index: linux-2.6.18.8/fs/ext3/xattr.c
===================================================================
---- linux-2.6.18.orig/fs/ext3/xattr.c
-+++ linux-2.6.18/fs/ext3/xattr.c
+--- linux-2.6.18.8.orig/fs/ext3/xattr.c 2007-06-20 18:54:52.000000000 +0200
++++ linux-2.6.18.8/fs/ext3/xattr.c 2007-06-20 18:54:59.000000000 +0200
@@ -1007,7 +1007,7 @@ ext3_xattr_set_handle(handle_t *handle,
}
if (!error) {
error = ext3_mark_iloc_dirty(handle, inode, &is.iloc);
/*
* The bh is consumed by ext3_mark_iloc_dirty, even with
-Index: linux-2.6.18/include/linux/ext3_fs.h
+Index: linux-2.6.18.8/include/linux/ext3_fs.h
===================================================================
---- linux-2.6.18.orig/include/linux/ext3_fs.h
-+++ linux-2.6.18/include/linux/ext3_fs.h
-@@ -268,7 +268,7 @@ struct ext3_inode {
+--- linux-2.6.18.8.orig/include/linux/ext3_fs.h 2007-06-20 18:54:59.000000000 +0200
++++ linux-2.6.18.8/include/linux/ext3_fs.h 2007-06-20 18:54:59.000000000 +0200
+@@ -288,7 +288,7 @@ struct ext3_inode {
__le16 i_uid; /* Low 16 bits of Owner Uid */
__le32 i_size; /* Size in bytes */
__le32 i_atime; /* Access time */
__le32 i_mtime; /* Modification time */
__le32 i_dtime; /* Deletion Time */
__le16 i_gid; /* Low 16 bits of Group Id */
-@@ -317,10 +317,73 @@ struct ext3_inode {
+@@ -337,10 +337,73 @@ struct ext3_inode {
} osd2; /* OS dependent 2 */
__le16 i_extra_isize;
__le16 i_pad1;
#if defined(__KERNEL__) || defined(__linux__)
#define i_reserved1 osd1.linux1.l_i_reserved1
#define i_frag osd2.linux2.l_i_frag
-@@ -498,11 +562,19 @@ struct ext3_super_block {
+@@ -520,11 +583,19 @@ struct ext3_super_block {
__le32 s_last_orphan; /* start of list of inodes to delete */
__le32 s_hash_seed[4]; /* HTREE hash seed */
__u8 s_def_hash_version; /* Default hash version to use */
};
#ifdef __KERNEL__
-@@ -519,6 +584,13 @@ static inline struct ext3_inode_info *EX
+@@ -539,6 +610,13 @@ static inline struct ext3_inode_info *EX
return container_of(inode, struct ext3_inode_info, vfs_inode);
}
static inline int ext3_valid_inum(struct super_block *sb, unsigned long ino)
{
return ino == EXT3_ROOT_INO ||
-@@ -590,6 +662,8 @@ static inline int ext3_valid_inum(struct
- #define EXT3_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
+@@ -611,6 +689,8 @@ static inline int ext3_valid_inum(struct
#define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
+ #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010
#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK 0x0020
+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE 0x0040
+
#define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001
#define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002
-@@ -606,6 +680,7 @@ static inline int ext3_valid_inum(struct
- #define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
+@@ -628,6 +708,7 @@ static inline int ext3_valid_inum(struct
EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \
EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \
+ EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| \
EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
/*
-Index: linux-2.6.18/include/linux/ext3_fs_sb.h
+Index: linux-2.6.18.8/include/linux/ext3_fs_sb.h
===================================================================
---- linux-2.6.18.orig/include/linux/ext3_fs_sb.h
-+++ linux-2.6.18/include/linux/ext3_fs_sb.h
-@@ -119,6 +119,8 @@ struct ext3_sb_info {
- spinlock_t s_bal_lock;
- unsigned long s_mb_buddies_generated;
- unsigned long long s_mb_generation_time;
-+
-+ unsigned int s_want_extra_isize; /* New inodes should reserve # bytes */
- };
+--- linux-2.6.18.8.orig/include/linux/ext3_fs_sb.h 2007-06-20 18:54:54.000000000 +0200
++++ linux-2.6.18.8/include/linux/ext3_fs_sb.h 2007-06-20 18:54:59.000000000 +0200
+@@ -68,6 +68,9 @@ struct ext3_sb_info {
+ /* Last group used to allocate inode */
+ int s_last_alloc_group;
- #define EXT3_GROUP_INFO(sb, group) \
-Index: linux-2.6.18/include/linux/ext3_fs_i.h
++ /* New inodes should reserve # bytes */
++ unsigned int s_want_extra_isize;
++
+ /* root of the per fs reservation window tree */
+ spinlock_t s_rsv_window_lock;
+ struct rb_root s_rsv_window_root;
+Index: linux-2.6.18.8/include/linux/ext3_fs_i.h
===================================================================
---- linux-2.6.18.orig/include/linux/ext3_fs_i.h
-+++ linux-2.6.18/include/linux/ext3_fs_i.h
-@@ -144,6 +144,7 @@ struct ext3_inode_info {
- struct inode vfs_inode;
+--- linux-2.6.18.8.orig/include/linux/ext3_fs_i.h 2007-06-20 18:54:57.000000000 +0200
++++ linux-2.6.18.8/include/linux/ext3_fs_i.h 2007-06-20 18:54:59.000000000 +0200
+@@ -140,6 +140,8 @@ struct ext3_inode_info {
+ /* on-disk additional length */
+ __u16 i_extra_isize;
- __u32 i_cached_extent[4];
+ struct timespec i_crtime;
-
- void *i_filterdata;
- };
++
+ /*
+ * truncate_mutex is for serialising ext3_truncate() against
+ * ext3_getblock(). In the 2.4 ext2 design, great chunks of inode's