Whamcloud - gitweb
b=21564 Print mmp_check_interval in kmmpd
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext3-nanosecond-2.6-rhel4.patch
index 1bd6226..de039fc 100644 (file)
@@ -1,8 +1,8 @@
-Index: linux-2.6.9-rhel4/fs/ext3/ialloc.c
+Index: linux-stage/fs/ext3/ialloc.c
 ===================================================================
---- linux-2.6.9-rhel4.orig/fs/ext3/ialloc.c
-+++ linux-2.6.9-rhel4/fs/ext3/ialloc.c
-@@ -612,7 +612,8 @@ got:
+--- linux-stage.orig/fs/ext3/ialloc.c
++++ linux-stage/fs/ext3/ialloc.c
+@@ -726,7 +726,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.9-rhel4/fs/ext3/ialloc.c
  
        memset(ei->i_data, 0, sizeof(ei->i_data));
        ei->i_next_alloc_block = 0;
-@@ -650,9 +651,8 @@ got:
+@@ -764,9 +765,8 @@ got:
        spin_unlock(&sbi->s_next_gen_lock);
  
        ei->i_state = EXT3_STATE_NEW;
@@ -24,10 +24,10 @@ Index: linux-2.6.9-rhel4/fs/ext3/ialloc.c
  
        ret = inode;
        if(DQUOT_ALLOC_INODE(inode)) {
-Index: linux-2.6.9-rhel4/fs/ext3/inode.c
+Index: linux-stage/fs/ext3/inode.c
 ===================================================================
---- linux-2.6.9-rhel4.orig/fs/ext3/inode.c
-+++ linux-2.6.9-rhel4/fs/ext3/inode.c
+--- linux-stage.orig/fs/ext3/inode.c
++++ linux-stage/fs/ext3/inode.c
 @@ -627,7 +627,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.9-rhel4/fs/ext3/inode.c
        ext3_mark_inode_dirty(handle, inode);
  
        /* had we spliced it onto indirect block? */
-@@ -2227,7 +2227,7 @@ do_indirects:
+@@ -2230,7 +2230,7 @@ do_indirects:
                        ;
        }
        up(&ei->truncate_sem);
@@ -46,7 +46,7 @@ Index: linux-2.6.9-rhel4/fs/ext3/inode.c
        ext3_mark_inode_dirty(handle, inode);
  
        /* In a multi-transaction truncate, we only make the final
-@@ -2454,10 +2454,6 @@ void ext3_read_inode(struct inode * inod
+@@ -2457,10 +2457,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.9-rhel4/fs/ext3/inode.c
  
        ei->i_state = 0;
        ei->i_next_alloc_block = 0;
-@@ -2518,6 +2514,11 @@ void ext3_read_inode(struct inode * inod
+@@ -2521,6 +2517,11 @@ void ext3_read_inode(struct inode * inod
        else
                ei->i_extra_isize = 0;
  
@@ -69,7 +69,7 @@ Index: linux-2.6.9-rhel4/fs/ext3/inode.c
        if (S_ISREG(inode->i_mode)) {
                inode->i_op = &ext3_file_inode_operations;
                inode->i_fop = &ext3_file_operations;
-@@ -2598,9 +2599,12 @@ static int ext3_do_update_inode(handle_t
+@@ -2601,9 +2602,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.9-rhel4/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.9-rhel4/fs/ext3/ioctl.c
+Index: linux-stage/fs/ext3/ioctl.c
 ===================================================================
---- linux-2.6.9-rhel4.orig/fs/ext3/ioctl.c
-+++ linux-2.6.9-rhel4/fs/ext3/ioctl.c
+--- linux-stage.orig/fs/ext3/ioctl.c
++++ linux-stage/fs/ext3/ioctl.c
 @@ -112,7 +112,7 @@ int ext3_ioctl (struct inode * inode, st
                ei->i_flags = flags;
  
@@ -107,10 +107,10 @@ Index: linux-2.6.9-rhel4/fs/ext3/ioctl.c
                        inode->i_generation = generation;
                        err = ext3_mark_iloc_dirty(handle, inode, &iloc);
                }
-Index: linux-2.6.9-rhel4/fs/ext3/namei.c
+Index: linux-stage/fs/ext3/namei.c
 ===================================================================
---- linux-2.6.9-rhel4.orig/fs/ext3/namei.c
-+++ linux-2.6.9-rhel4/fs/ext3/namei.c
+--- linux-stage.orig/fs/ext3/namei.c
++++ linux-stage/fs/ext3/namei.c
 @@ -1302,7 +1302,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.9-rhel4/fs/ext3/namei.c
        ext3_update_dx_flag(old_dir);
        if (dir_bh) {
                BUFFER_TRACE(dir_bh, "get_write_access");
-Index: linux-2.6.9-rhel4/fs/ext3/super.c
+Index: linux-stage/fs/ext3/super.c
 ===================================================================
---- linux-2.6.9-rhel4.orig/fs/ext3/super.c
-+++ linux-2.6.9-rhel4/fs/ext3/super.c
-@@ -1468,6 +1468,8 @@ static int ext3_fill_super (struct super
+--- linux-stage.orig/fs/ext3/super.c
++++ linux-stage/fs/ext3/super.c
+@@ -1573,6 +1573,8 @@ static int ext3_fill_super (struct super
                                sbi->s_inode_size);
                        goto failed_mount;
                }
@@ -188,7 +188,7 @@ Index: linux-2.6.9-rhel4/fs/ext3/super.c
        }
        sbi->s_frag_size = EXT3_MIN_FRAG_SIZE <<
                                   le32_to_cpu(es->s_log_frag_size);
-@@ -1654,6 +1656,32 @@ static int ext3_fill_super (struct super
+@@ -1759,6 +1761,32 @@ static int ext3_fill_super (struct super
        }
  
        ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
@@ -221,10 +221,10 @@ Index: linux-2.6.9-rhel4/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.9-rhel4/fs/ext3/xattr.c
+Index: linux-stage/fs/ext3/xattr.c
 ===================================================================
---- linux-2.6.9-rhel4.orig/fs/ext3/xattr.c
-+++ linux-2.6.9-rhel4/fs/ext3/xattr.c
+--- linux-stage.orig/fs/ext3/xattr.c
++++ linux-stage/fs/ext3/xattr.c
 @@ -1305,7 +1305,7 @@ getblk_failed:
  
        /* Update the inode. */
@@ -234,11 +234,11 @@ Index: linux-2.6.9-rhel4/fs/ext3/xattr.c
        ext3_mark_inode_dirty(handle, inode);
        if (IS_SYNC(inode))
                handle->h_sync = 1;
-Index: linux-2.6.9-rhel4/include/linux/ext3_fs.h
+Index: linux-stage/include/linux/ext3_fs.h
 ===================================================================
---- linux-2.6.9-rhel4.orig/include/linux/ext3_fs.h
-+++ linux-2.6.9-rhel4/include/linux/ext3_fs.h
-@@ -258,7 +258,7 @@ struct ext3_inode {
+--- linux-stage.orig/include/linux/ext3_fs.h
++++ linux-stage/include/linux/ext3_fs.h
+@@ -280,7 +280,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.9-rhel4/include/linux/ext3_fs.h
        __le32  i_mtime;        /* Modification time */
        __le32  i_dtime;        /* Deletion Time */
        __le16  i_gid;          /* Low 16 bits of Group Id */
-@@ -307,10 +307,73 @@ struct ext3_inode {
+@@ -329,10 +329,73 @@ struct ext3_inode {
        } osd2;                         /* OS dependent 2 */
        __u16   i_extra_isize;
        __u16   i_pad1;
@@ -321,34 +321,47 @@ Index: linux-2.6.9-rhel4/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
-@@ -490,7 +553,9 @@ struct ext3_super_block {
-       __u16   s_reserved_word_pad;
+@@ -500,11 +563,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 */
+-      __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 */
++      __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_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 */
-+      __u32   s_reserved[189];        /* Padding to the end of the block */
++      __le32  s_flags;                /* Miscellaneous flags */
++      __u32   s_reserved[167];        /* Padding to the end of the block */
  };
  
  #ifdef __KERNEL__
-@@ -565,6 +630,7 @@ static inline struct ext3_inode_info *EX
- #define EXT3_FEATURE_RO_COMPAT_LARGE_FILE     0x0002
+@@ -580,6 +651,7 @@ static inline struct ext3_inode_info *EX
  #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
-@@ -581,6 +647,7 @@ static inline struct ext3_inode_info *EX
- #define EXT3_FEATURE_RO_COMPAT_SUPP   (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
+@@ -597,6 +669,7 @@ static inline struct ext3_inode_info *EX
                                         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)
  
  /*
-@@ -708,6 +775,12 @@ static inline struct ext3_inode *ext3_ra
+@@ -724,6 +797,12 @@ static inline struct ext3_inode *ext3_ra
        return (struct ext3_inode *) (iloc->bh->b_data + iloc->offset);
  }
  
@@ -361,28 +374,28 @@ Index: linux-2.6.9-rhel4/include/linux/ext3_fs.h
  /*
   * This structure is stuffed into the struct file's private_data field
   * for directories.  It is where we put information so that we can do
-Index: linux-2.6.9-rhel4/include/linux/ext3_fs_i.h
+Index: linux-stage/include/linux/ext3_fs_i.h
 ===================================================================
---- linux-2.6.9-rhel4.orig/include/linux/ext3_fs_i.h
-+++ linux-2.6.9-rhel4/include/linux/ext3_fs_i.h
+--- linux-stage.orig/include/linux/ext3_fs_i.h
++++ linux-stage/include/linux/ext3_fs_i.h
 @@ -130,6 +130,7 @@ struct ext3_inode_info {
-       struct inode vfs_inode;
  
-       __u32 i_cached_extent[4];
+       /* on-disk additional length */
+       __u16 i_extra_isize;
 +      struct timespec i_crtime;
- };
  
- #endif        /* _LINUX_EXT3_FS_I */
-Index: linux-2.6.9-rhel4/include/linux/ext3_fs_sb.h
+       /*
+        * truncate_sem is for serialising ext3_truncate() against
+Index: linux-stage/include/linux/ext3_fs_sb.h
 ===================================================================
---- linux-2.6.9-rhel4.orig/include/linux/ext3_fs_sb.h
-+++ linux-2.6.9-rhel4/include/linux/ext3_fs_sb.h
-@@ -122,6 +122,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-stage.orig/include/linux/ext3_fs_sb.h
++++ linux-stage/include/linux/ext3_fs_sb.h
+@@ -71,6 +71,8 @@ struct ext3_sb_info {
+       /* Last group used to allocate inode */
+       int s_last_alloc_group;
  
- #define EXT3_GROUP_INFO(sb, group)                                       \
++      unsigned int s_want_extra_isize; /* New inodes should reserve # bytes */
++
+       /* root of the per fs reservation window tree */
+       spinlock_t s_rsv_window_lock;
+       struct rb_root s_rsv_window_root;