Whamcloud - gitweb
Branch b1_6
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext3-nanosecond-2.6.18-vanilla.patch
index 99e9350..922481c 100644 (file)
@@ -1,8 +1,8 @@
-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;
@@ -12,7 +12,7 @@ Index: linux-2.6.18/fs/ext3/ialloc.c
  
        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;
@@ -24,11 +24,11 @@ Index: linux-2.6.18/fs/ext3/ialloc.c
  
        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 */
  
@@ -37,7 +37,7 @@ Index: linux-2.6.18/fs/ext3/inode.c
        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);
@@ -46,7 +46,7 @@ Index: linux-2.6.18/fs/ext3/inode.c
        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);
@@ -57,7 +57,7 @@ Index: linux-2.6.18/fs/ext3/inode.c
  
        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;
  
@@ -69,7 +69,7 @@ Index: linux-2.6.18/fs/ext3/inode.c
        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);
@@ -85,10 +85,10 @@ Index: linux-2.6.18/fs/ext3/inode.c
        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;
  
@@ -98,7 +98,7 @@ Index: linux-2.6.18/fs/ext3/ioctl.c
  
                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) {
@@ -107,10 +107,10 @@ Index: linux-2.6.18/fs/ext3/ioctl.c
                        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.
@@ -175,11 +175,11 @@ Index: linux-2.6.18/fs/ext3/namei.c
        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;
                }
@@ -188,7 +188,7 @@ Index: linux-2.6.18/fs/ext3/super.c
        }
        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);
@@ -198,7 +198,7 @@ Index: linux-2.6.18/fs/ext3/super.c
 +              sbi->s_want_extra_isize = sizeof(struct ext3_inode) -
 +                                                   EXT3_GOOD_OLD_INODE_SIZE;
 +              if (EXT3_HAS_RO_COMPAT_FEATURE(sb,
-+                                     EXT3_FEATURE_RO_COMPAT_EXTRA_ISIZE)) {
++                                     EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)) {
 +                      if (sbi->s_want_extra_isize <
 +                          le16_to_cpu(es->s_want_extra_isize))
 +                              sbi->s_want_extra_isize =
@@ -221,10 +221,10 @@ Index: linux-2.6.18/fs/ext3/super.c
        /*
         * 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) {
@@ -234,11 +234,11 @@ Index: linux-2.6.18/fs/ext3/xattr.c
                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 */
@@ -247,7 +247,7 @@ Index: linux-2.6.18/include/linux/ext3_fs.h
        __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;
@@ -321,20 +321,31 @@ Index: linux-2.6.18/include/linux/ext3_fs.h
  #if defined(__KERNEL__) || defined(__linux__)
  #define i_reserved1   osd1.linux1.l_i_reserved1
  #define i_frag                osd2.linux2.l_i_frag
-@@ -503,8 +566,10 @@ struct ext3_super_block {
-       __u8    s_reserved_char_pad;
-       __u16   s_reserved_word_pad;
+@@ -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 */
+-      __u8    s_reserved_char_pad;
+-      __u16   s_reserved_word_pad;
++      __u8    s_jnl_backup_type;      /* Default type of journal backup */
++      __le16  s_desc_size;            /* Group desc. size: INCOMPAT_64BIT */
        __le32  s_default_mount_opts;
 -      __le32  s_first_meta_bg;        /* First metablock block group */
 -      __u32   s_reserved[190];        /* Padding to the end of the block */
 +      __le32  s_first_meta_bg;        /* First metablock block group */
-+      __le16  s_min_extra_isize;      /* All inodes have at least # bytes */
-+      __le16  s_want_extra_isize;     /* New inodes should reserve # bytes */
-+      __u32   s_reserved[189];        /* Padding to the end of the block */
++      __le32  s_mkfs_time;            /* When the filesystem was created */
++      __le32  s_jnl_blocks[17];       /* Backup of the journal inode */
++      __le32  s_blocks_count_hi;      /* Blocks count high 32 bits */
++      __le32  s_r_blocks_count_hi;    /* Reserved blocks count high 32 bits*/
++      __le32  s_free_blocks_count_hi; /* Free blocks count high 32 bits */
++      __le16  s_min_extra_isize;      /* All inodes have at least # bytes */
++      __le16  s_want_extra_isize;     /* New inodes should reserve # bytes */
++      __le32  s_flags;                /* Miscellaneous flags */
++      __u32   s_reserved[167];        /* Padding to the end of the block */
  };
  
  #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);
  }
  
@@ -348,45 +359,47 @@ Index: linux-2.6.18/include/linux/ext3_fs.h
  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 EXT3_FEATURE_RO_COMPAT_DIR_NLINK              0x0020
-+#define EXT3_FEATURE_RO_COMPAT_EXTRA_ISIZE    0x0040
+ #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| \
-                                        EXT3_FEATURE_RO_COMPAT_DIR_NLINK| \
-+                                       EXT3_FEATURE_RO_COMPAT_EXTRA_ISIZE| \
+                                        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