Whamcloud - gitweb
LU-351 RHEL6 U1 support.
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext4-extents-mount-option-rhel6.patch
index c4cc531..e944013 100644 (file)
@@ -1,8 +1,8 @@
 Index: linux-stage/fs/ext4/ext4.h
 ===================================================================
---- linux-stage.orig/fs/ext4/ext4.h    2011-03-14 15:57:13.613674482 +0800
-+++ linux-stage/fs/ext4/ext4.h 2011-03-14 15:57:22.031906980 +0800
-@@ -780,6 +780,7 @@
+--- linux-stage.orig/fs/ext4/ext4.h    2011-05-20 11:01:37.000000000 +0300
++++ linux-stage/fs/ext4/ext4.h 2011-05-20 11:01:44.000000000 +0300
+@@ -859,6 +859,7 @@ struct ext4_inode_info {
  #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 */
@@ -12,8 +12,8 @@ Index: linux-stage/fs/ext4/ext4.h
  #define EXT4_MOUNT_I_VERSION            0x2000000 /* i_version support */
 Index: linux-stage/fs/ext4/ext4_jbd2.h
 ===================================================================
---- linux-stage.orig/fs/ext4/ext4_jbd2.h       2011-03-14 15:57:12.000000000 +0800
-+++ linux-stage/fs/ext4/ext4_jbd2.h    2011-03-14 15:58:55.957499110 +0800
+--- linux-stage.orig/fs/ext4/ext4_jbd2.h       2011-05-20 11:00:01.000000000 +0300
++++ linux-stage/fs/ext4/ext4_jbd2.h    2011-05-20 11:01:44.000000000 +0300
 @@ -33,7 +33,7 @@
  
  #define EXT4_SINGLEDATA_TRANS_BLOCKS(sb)                              \
@@ -22,12 +22,12 @@ Index: linux-stage/fs/ext4/ext4_jbd2.h
 +       || test_opt(sb, EXTENTS) ? 27U : 8U)
  
  #define ext4_journal_dirty_metadata(handle, bh)  \
-                 ext4_handle_dirty_metadata(handle, NULL, bh)
+               ext4_handle_dirty_metadata(handle, NULL, bh)
 Index: linux-stage/fs/ext4/extents.c
 ===================================================================
---- linux-stage.orig/fs/ext4/extents.c 2011-03-14 15:57:12.000000000 +0800
-+++ linux-stage/fs/ext4/extents.c      2011-03-14 16:14:14.246265207 +0800
-@@ -2553,7 +2553,7 @@
+--- linux-stage.orig/fs/ext4/extents.c 2011-05-20 11:00:01.000000000 +0300
++++ linux-stage/fs/ext4/extents.c      2011-05-20 11:01:44.000000000 +0300
+@@ -2555,7 +2555,7 @@ void ext4_ext_init(struct super_block *s
         * possible initialization would be here
         */
  
@@ -36,7 +36,7 @@ Index: linux-stage/fs/ext4/extents.c
  #if defined(AGGRESSIVE_TEST) || defined(CHECK_BINSEARCH) || defined(EXTENTS_STATS)
                printk(KERN_INFO "EXT4-fs: file extents enabled");
  #ifdef AGGRESSIVE_TEST
-@@ -2580,7 +2580,7 @@
+@@ -2582,7 +2582,7 @@ void ext4_ext_init(struct super_block *s
   */
  void ext4_ext_release(struct super_block *sb)
  {
@@ -47,9 +47,9 @@ Index: linux-stage/fs/ext4/extents.c
  #ifdef EXTENTS_STATS
 Index: linux-stage/fs/ext4/ialloc.c
 ===================================================================
---- linux-stage.orig/fs/ext4/ialloc.c  2011-03-14 15:57:13.000000000 +0800
-+++ linux-stage/fs/ext4/ialloc.c       2011-03-14 16:02:03.334308846 +0800
-@@ -1049,7 +1049,7 @@
+--- linux-stage.orig/fs/ext4/ialloc.c  2011-05-20 11:01:36.000000000 +0300
++++ linux-stage/fs/ext4/ialloc.c       2011-05-20 11:01:44.000000000 +0300
+@@ -1049,7 +1049,7 @@ got:
        if (err)
                goto fail_free_drop;
  
@@ -57,12 +57,12 @@ Index: linux-stage/fs/ext4/ialloc.c
 +      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_I(inode)->i_flags |= EXT4_EXTENTS_FL;
+                       ext4_set_inode_flag(inode, EXT4_INODE_EXTENTS);
 Index: linux-stage/fs/ext4/migrate.c
 ===================================================================
---- linux-stage.orig/fs/ext4/migrate.c 2011-03-14 15:36:15.000000000 +0800
-+++ linux-stage/fs/ext4/migrate.c      2011-03-14 16:05:39.083369164 +0800
-@@ -459,13 +459,13 @@
+--- linux-stage.orig/fs/ext4/migrate.c 2011-05-20 10:59:29.000000000 +0300
++++ linux-stage/fs/ext4/migrate.c      2011-05-20 11:03:22.000000000 +0300
+@@ -459,13 +459,10 @@ int ext4_ext_migrate(struct inode *inode
        unsigned long max_entries;
        __u32 goal;
  
@@ -72,22 +72,19 @@ Index: linux-stage/fs/ext4/migrate.c
 -       */
 -      if (!EXT4_HAS_INCOMPAT_FEATURE(inode->i_sb,
 -                                     EXT4_FEATURE_INCOMPAT_EXTENTS) ||
--          (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
+-          (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)))
 +      if (!test_opt(inode->i_sb, EXTENTS))
 +              /*
 +               * if mounted with noextents we don't allow the migrate
 +               */
-+              return -EINVAL;
-+
-+      if ((EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
                return -EINVAL;
  
        if (S_ISLNK(inode->i_mode) && inode->i_blocks == 0)
 Index: linux-stage/fs/ext4/super.c
 ===================================================================
---- linux-stage.orig/fs/ext4/super.c   2011-03-14 15:57:18.000000000 +0800
-+++ linux-stage/fs/ext4/super.c        2011-03-14 16:11:58.234626200 +0800
-@@ -942,6 +942,8 @@
+--- linux-stage.orig/fs/ext4/super.c   2011-05-20 11:01:37.000000000 +0300
++++ linux-stage/fs/ext4/super.c        2011-05-20 11:01:44.000000000 +0300
+@@ -945,6 +945,8 @@ static int ext4_show_options(struct seq_
                seq_puts(seq, ",journal_async_commit");
        if (test_opt(sb, NOBH))
                seq_puts(seq, ",nobh");
@@ -96,7 +93,7 @@ Index: linux-stage/fs/ext4/super.c
        if (test_opt(sb, I_VERSION))
                seq_puts(seq, ",i_version");
        if (!test_opt(sb, DELALLOC))
-@@ -1500,6 +1502,7 @@
+@@ -1515,6 +1517,7 @@ enum {
        Opt_inode_readahead_blks, Opt_journal_ioprio,
        Opt_discard, Opt_nodiscard,
        Opt_mballoc, Opt_bigendian_extents, Opt_force_over_16tb,
@@ -104,7 +101,7 @@ Index: linux-stage/fs/ext4/super.c
  };
  
  static const match_table_t tokens = {
-@@ -1571,6 +1574,8 @@
+@@ -1589,6 +1592,8 @@ static const match_table_t tokens = {
        {Opt_mballoc, "mballoc"},
        {Opt_discard, "discard"},
        {Opt_nodiscard, "nodiscard"},
@@ -113,7 +110,7 @@ Index: linux-stage/fs/ext4/super.c
        {Opt_err, NULL},
  };
  
-@@ -1613,6 +1618,7 @@
+@@ -1631,6 +1636,7 @@ static int parse_options(char *options, 
        int qtype, qfmt;
        char *qname;
  #endif
@@ -121,7 +118,7 @@ Index: linux-stage/fs/ext4/super.c
  
        if (!options)
                return 1;
-@@ -2017,6 +2023,32 @@
+@@ -2039,6 +2045,32 @@ set_qf_format:
                case Opt_force_over_16tb:
                        force_over_16tb = 1;
                        break;
@@ -154,7 +151,7 @@ Index: linux-stage/fs/ext4/super.c
                default:
                        ext4_msg(sb, KERN_ERR,
                               "Unrecognized mount option \"%s\" "
-@@ -2879,6 +2911,17 @@
+@@ -2901,6 +2933,17 @@ static int ext4_fill_super(struct super_
        set_opt(sbi->s_mount_opt, BARRIER);
  
        /*