Whamcloud - gitweb
LU-5276 ldiskfs: Remove extents-mount-option patch 88/11088/4
authorYang Sheng <yang.sheng@intel.com>
Mon, 14 Jul 2014 12:18:04 +0000 (20:18 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 24 Jul 2014 21:55:21 +0000 (21:55 +0000)
Remove ext4-extents-mount-option.patch for ldiskfs. It
means '-o {extents|noextents}' option not support anymore.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I7989fbf9a94c1556728531c7837a887df67e6b19
Reviewed-on: http://review.whamcloud.com/11088
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
ldiskfs/kernel_patches/patches/rhel6.3/ext4-disable-mb-cache.patch
ldiskfs/kernel_patches/patches/rhel6.3/ext4-extents-mount-option.patch [deleted file]
ldiskfs/kernel_patches/patches/sles11sp2/ext4-disable-mb-cache.patch
ldiskfs/kernel_patches/patches/sles11sp2/ext4-extents-mount-option.patch [deleted file]
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.4.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.5.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series
ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series
ldiskfs/kernel_patches/series/ldiskfs-3.0-sles11sp3.series
lustre/osd-ldiskfs/osd_io.c

index 80a62d3..87e5b86 100644 (file)
@@ -1,8 +1,8 @@
-Index: linux-stage/fs/ext4/ext4.h
+Index: linux-2.6.32-431.17.1.el6.x86_64/fs/ext4/ext4.h
 ===================================================================
---- linux-stage.orig/fs/ext4/ext4.h    2011-03-14 16:16:45.000000000 +0800
-+++ linux-stage/fs/ext4/ext4.h 2011-03-14 16:17:08.732676431 +0800
-@@ -758,7 +758,8 @@
+--- linux-2.6.32-431.17.1.el6.x86_64.orig/fs/ext4/ext4.h
++++ linux-2.6.32-431.17.1.el6.x86_64/fs/ext4/ext4.h
+@@ -874,7 +874,8 @@ struct ext4_inode_info {
  /*
   * Mount flags
   */
@@ -12,29 +12,29 @@ Index: linux-stage/fs/ext4/ext4.h
  #define EXT4_MOUNT_GRPID              0x00004 /* Create files with directory's group */
  #define EXT4_MOUNT_DEBUG              0x00008 /* Some debugging messages */
  #define EXT4_MOUNT_ERRORS_CONT                0x00010 /* Continue on errors */
-Index: linux-stage/fs/ext4/super.c
+Index: linux-2.6.32-431.17.1.el6.x86_64/fs/ext4/super.c
 ===================================================================
---- linux-stage.orig/fs/ext4/super.c   2011-03-14 16:16:45.000000000 +0800
-+++ linux-stage/fs/ext4/super.c        2011-03-14 16:18:13.831956469 +0800
-@@ -1502,6 +1502,7 @@
+--- linux-2.6.32-431.17.1.el6.x86_64.orig/fs/ext4/super.c
++++ linux-2.6.32-431.17.1.el6.x86_64/fs/ext4/super.c
+@@ -1216,6 +1216,7 @@ enum {
+       Opt_block_validity, Opt_noblock_validity,
        Opt_inode_readahead_blks, Opt_journal_ioprio,
        Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb,
-       Opt_extents, Opt_noextents,
 +      Opt_no_mbcache,
        Opt_discard, Opt_nodiscard,
-       Opt_init_inode_table, Opt_noinit_inode_table,
+       Opt_init_itable, Opt_noinit_itable,
  };
-@@ -1574,6 +1575,7 @@
-       {Opt_noauto_da_alloc, "noauto_da_alloc"},
-       {Opt_bigendian_extents, "bigendian_extents"},
+@@ -1291,6 +1292,7 @@ static const match_table_t tokens = {
+       {Opt_bigendian_extents, "bigendian_extents"},
+       {Opt_force_over_128tb, "force_over_128tb"},
        {Opt_mballoc, "mballoc"},
 +      {Opt_no_mbcache, "no_mbcache"},
-       {Opt_extents, "extents"},
-       {Opt_noextents, "noextents"},
        {Opt_discard, "discard"},
-@@ -2049,6 +2051,9 @@
-                       }
-                       clear_opt(sbi->s_mount_opt, EXTENTS);
+       {Opt_nodiscard, "nodiscard"},
+       {Opt_init_itable, "init_itable=%u"},
+@@ -1763,6 +1765,9 @@ set_qf_format:
+               case Opt_force_over_128tb:
+                       force_over_128tb = 1;
                        break;
 +              case Opt_no_mbcache:
 +                      set_opt(sbi->s_mount_opt, NO_MBCACHE);
@@ -42,10 +42,10 @@ Index: linux-stage/fs/ext4/super.c
                default:
                        ext4_msg(sb, KERN_ERR,
                               "Unrecognized mount option \"%s\" "
-Index: linux-stage/fs/ext4/xattr.c
+Index: linux-2.6.32-431.17.1.el6.x86_64/fs/ext4/xattr.c
 ===================================================================
---- linux-stage.orig/fs/ext4/xattr.c   2011-03-14 16:16:43.000000000 +0800
-+++ linux-stage/fs/ext4/xattr.c        2011-03-14 16:17:08.806677883 +0800
+--- linux-2.6.32-431.17.1.el6.x86_64.orig/fs/ext4/xattr.c
++++ linux-2.6.32-431.17.1.el6.x86_64/fs/ext4/xattr.c
 @@ -86,7 +86,8 @@
  # define ea_bdebug(f...)
  #endif
@@ -56,16 +56,16 @@ Index: linux-stage/fs/ext4/xattr.c
  static struct buffer_head *ext4_xattr_cache_find(struct inode *,
                                                 struct ext4_xattr_header *,
                                                 struct mb_cache_entry **);
-@@ -234,7 +235,7 @@
+@@ -333,7 +334,7 @@ bad_block:
                error = -EIO;
                goto cleanup;
        }
 -      ext4_xattr_cache_insert(bh);
 +      ext4_xattr_cache_insert(inode->i_sb, bh);
        entry = BFIRST(bh);
-       error = ext4_xattr_find_entry(&entry, name_index, name, bh->b_size, 1);
-       if (error == -EIO)
-@@ -376,7 +377,7 @@
+       error = ext4_xattr_find_entry(&entry, name_index, name, bh->b_size, 1,
+                                     inode);
+@@ -492,7 +493,7 @@ ext4_xattr_block_list(struct inode *inod
                error = -EIO;
                goto cleanup;
        }
@@ -74,7 +74,7 @@ Index: linux-stage/fs/ext4/xattr.c
        error = ext4_xattr_list_entries(inode, BFIRST(bh), buffer, buffer_size);
  
  cleanup:
-@@ -473,7 +474,9 @@
+@@ -589,7 +590,9 @@ ext4_xattr_release_block(handle_t *handl
        struct mb_cache_entry *ce = NULL;
        int error = 0;
  
@@ -85,9 +85,9 @@ Index: linux-stage/fs/ext4/xattr.c
        error = ext4_journal_get_write_access(handle, bh);
        if (error)
                goto out;
-@@ -700,8 +703,10 @@
      if (i->value && i->value_len > sb->s_blocksize)
-               return -ENOSPC;
+@@ -988,8 +991,10 @@ ext4_xattr_block_set(handle_t *handle, s
#define header(x) ((struct ext4_xattr_header *)(x))
        if (s->base) {
 -              ce = mb_cache_entry_get(ext4_xattr_cache, bs->bh->b_bdev,
 -                                      bs->bh->b_blocknr);
@@ -98,7 +98,7 @@ Index: linux-stage/fs/ext4/xattr.c
                error = ext4_journal_get_write_access(handle, bs->bh);
                if (error)
                        goto cleanup;
-@@ -718,7 +723,7 @@
+@@ -1006,7 +1011,7 @@ ext4_xattr_block_set(handle_t *handle, s
                                if (!IS_LAST_ENTRY(s->first))
                                        ext4_xattr_rehash(header(s->base),
                                                          s->here);
@@ -107,7 +107,7 @@ Index: linux-stage/fs/ext4/xattr.c
                        }
                        unlock_buffer(bs->bh);
                        if (error == -EIO)
-@@ -801,7 +806,8 @@
+@@ -1089,7 +1094,8 @@ inserted:
                                if (error)
                                        goto cleanup_dquot;
                        }
@@ -117,7 +117,7 @@ Index: linux-stage/fs/ext4/xattr.c
                        ce = NULL;
                } else if (bs->bh && s->base == bs->bh->b_data) {
                        /* We were modifying this block in-place. */
-@@ -845,7 +851,7 @@
+@@ -1140,7 +1146,7 @@ getblk_failed:
                        memcpy(new_bh->b_data, s->base, new_bh->b_size);
                        set_buffer_uptodate(new_bh);
                        unlock_buffer(new_bh);
@@ -126,7 +126,7 @@ Index: linux-stage/fs/ext4/xattr.c
                        error = ext4_handle_dirty_metadata(handle,
                                                           inode, new_bh);
                        if (error)
-@@ -1403,12 +1409,15 @@
+@@ -1758,12 +1764,15 @@ ext4_xattr_put_super(struct super_block
   * Returns 0, or a negative error number on failure.
   */
  static void
@@ -143,7 +143,7 @@ Index: linux-stage/fs/ext4/xattr.c
        ce = mb_cache_entry_alloc(ext4_xattr_cache, GFP_NOFS);
        if (!ce) {
                ea_bdebug(bh, "out of memory");
-@@ -1482,6 +1491,8 @@
+@@ -1836,6 +1845,8 @@ ext4_xattr_cache_find(struct inode *inod
        __u32 hash = le32_to_cpu(header->h_hash);
        struct mb_cache_entry *ce;
  
diff --git a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-extents-mount-option.patch b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-extents-mount-option.patch
deleted file mode 100644 (file)
index 59da6f6..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-Index: linux-stage/fs/ext4/ext4.h
-===================================================================
---- 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 */
-+#define EXT4_MOUNT_EXTENTS            0x400000 /* Extents support */
- #define EXT4_MOUNT_JOURNAL_CHECKSUM   0x800000 /* Journal checksums */
- #define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT       0x1000000 /* Journal Async Commit */
- #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-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)                              \
-       (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)   \
--       ? 27U : 8U)
-+       || test_opt(sb, EXTENTS) ? 27U : 8U)
- #define ext4_journal_dirty_metadata(handle, bh)  \
-               ext4_handle_dirty_metadata(handle, NULL, bh)
-Index: linux-stage/fs/ext4/extents.c
-===================================================================
---- 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
-        */
--      if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) {
-+      if (test_opt(sb, EXTENTS)) {
- #if defined(AGGRESSIVE_TEST) || defined(CHECK_BINSEARCH) || defined(EXTENTS_STATS)
-               printk(KERN_INFO "EXT4-fs: file extents enabled");
- #ifdef AGGRESSIVE_TEST
-@@ -2582,7 +2582,7 @@ void ext4_ext_init(struct super_block *s
-  */
- void ext4_ext_release(struct super_block *sb)
- {
--      if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS))
-+      if (!test_opt(sb, EXTENTS))
-               return;
- #ifdef EXTENTS_STATS
-Index: linux-stage/fs/ext4/ialloc.c
-===================================================================
---- 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;
--      if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) {
-+      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_set_inode_flag(inode, EXT4_INODE_EXTENTS);
-Index: linux-stage/fs/ext4/migrate.c
-===================================================================
---- 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;
--      /*
--       * If the filesystem does not support extents, or the inode
--       * already is extent-based, error out.
--       */
--      if (!EXT4_HAS_INCOMPAT_FEATURE(inode->i_sb,
--                                     EXT4_FEATURE_INCOMPAT_EXTENTS) ||
--          (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 (S_ISLNK(inode->i_mode) && inode->i_blocks == 0)
-Index: linux-stage/fs/ext4/super.c
-===================================================================
---- 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");
-+      if (!test_opt(sb, EXTENTS))
-+              seq_puts(seq, ",noextents");
-       if (test_opt(sb, I_VERSION))
-               seq_puts(seq, ",i_version");
-       if (!test_opt(sb, DELALLOC))
-@@ -1515,6 +1517,7 @@ enum {
-       Opt_stripe, Opt_delalloc, Opt_nodelalloc,
-       Opt_inode_readahead_blks, Opt_journal_ioprio,
-       Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb,
-+      Opt_extents, Opt_noextents,
-       Opt_discard, Opt_nodiscard,
-       Opt_init_inode_table, Opt_noinit_inode_table,
- };
-@@ -1589,6 +1592,8 @@ static const match_table_t tokens = {
-       {Opt_noauto_da_alloc, "noauto_da_alloc"},
-       {Opt_bigendian_extents, "bigendian_extents"},
-       {Opt_mballoc, "mballoc"},
-+      {Opt_extents, "extents"},
-+      {Opt_noextents, "noextents"},
-       {Opt_discard, "discard"},
-       {Opt_nodiscard, "nodiscard"},
-       {Opt_init_inode_table, "init_itable=%u"},
-@@ -1631,6 +1636,7 @@ static int parse_options(char *options, 
-       int qtype, qfmt;
-       char *qname;
- #endif
-+      ext4_fsblk_t last_block;
-       if (!options)
-               return 1;
-@@ -2039,6 +2045,32 @@ set_qf_format:
-               case Opt_force_over_128tb:
-                       force_over_128tb = 1;
-                       break;
-+              case Opt_extents:
-+                      if (!EXT4_HAS_INCOMPAT_FEATURE(sb,
-+                                      EXT4_FEATURE_INCOMPAT_EXTENTS)) {
-+                              ext4_warning(sb, "extents feature not enabled "
-+                                               "on this filesystem, use tune2fs");
-+                              return 0;
-+                      }
-+                      set_opt(sbi->s_mount_opt, EXTENTS);
-+                      break;
-+              case Opt_noextents:
-+                      /*
-+                       * When e2fsprogs support resizing an already existing
-+                       * ext4 file system to greater than 2**32 we need to
-+                       * add support to block allocator to handle growing
-+                       * already existing block  mapped inode so that blocks
-+                       * allocated for them fall within 2**32
-+                       */
-+                      last_block = ext4_blocks_count(sbi->s_es) - 1;
-+                      if (last_block  > 0xffffffffULL) {
-+                              printk(KERN_ERR "EXT4-fs: Filesystem too "
-+                                              "large to mount with "
-+                                              "-o noextents options\n");
-+                              return 0;
-+                      }
-+                      clear_opt(sbi->s_mount_opt, EXTENTS);
-+                      break;
-               default:
-                       ext4_msg(sb, KERN_ERR,
-                              "Unrecognized mount option \"%s\" "
-@@ -2901,6 +2933,14 @@ static int ext4_fill_super(struct super_
-       set_opt(sbi->s_mount_opt, BARRIER);
-       /*
-+       * turn on extents feature by default in ext4 filesystem
-+       * only if feature flag already set by mkfs or tune2fs.
-+       * Use -o noextents to turn it off
-+       */
-+      if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS))
-+              set_opt(sbi->s_mount_opt, EXTENTS);
-+
-+      /*
-        * enable delayed allocation by default
-        * Use -o nodelalloc to turn it off
-        */
index 408d2b7..aa94f5c 100644 (file)
@@ -1,7 +1,8 @@
-diff -ru linux-stage.orig/fs/ext4/ext4.h linux-stage/fs/ext4/ext4.h
---- linux-stage.orig/fs/ext4/ext4.h    2012-12-31 15:58:19.000000000 -0500
-+++ linux-stage/fs/ext4/ext4.h 2012-12-31 15:58:42.000000000 -0500
-@@ -894,7 +894,8 @@
+Index: linux-3.0.101-0.5/fs/ext4/ext4.h
+===================================================================
+--- linux-3.0.101-0.5.orig/fs/ext4/ext4.h
++++ linux-3.0.101-0.5/fs/ext4/ext4.h
+@@ -893,7 +893,8 @@ struct ext4_inode_info {
  /*
   * Mount flags
   */
@@ -11,28 +12,29 @@ diff -ru linux-stage.orig/fs/ext4/ext4.h linux-stage/fs/ext4/ext4.h
  #define EXT4_MOUNT_GRPID              0x00004 /* Create files with directory's group */
  #define EXT4_MOUNT_DEBUG              0x00008 /* Some debugging messages */
  #define EXT4_MOUNT_ERRORS_CONT                0x00010 /* Continue on errors */
-diff -ru linux-stage.orig/fs/ext4/super.c linux-stage/fs/ext4/super.c
---- linux-stage.orig/fs/ext4/super.c   2012-12-31 15:58:19.000000000 -0500
-+++ linux-stage/fs/ext4/super.c        2012-12-31 15:59:19.000000000 -0500
-@@ -1306,6 +1306,7 @@
+Index: linux-3.0.101-0.5/fs/ext4/super.c
+===================================================================
+--- linux-3.0.101-0.5.orig/fs/ext4/super.c
++++ linux-3.0.101-0.5/fs/ext4/super.c
+@@ -1369,6 +1369,7 @@ enum {
+       Opt_inode_readahead_blks, Opt_journal_ioprio,
        Opt_dioread_nolock, Opt_dioread_lock,
        Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb,
-       Opt_extents, Opt_noextents,
 +      Opt_no_mbcache,
        Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable,
  };
-
-@@ -1383,6 +1384,7 @@
+@@ -1447,6 +1448,7 @@ static const match_table_t tokens = {
        {Opt_bigendian_extents, "bigendian_extents"},
        {Opt_force_over_128tb, "force_over_128tb"},
        {Opt_mballoc, "mballoc"},
 +      {Opt_no_mbcache, "no_mbcache"},
-       {Opt_extents, "extents"},
-       {Opt_noextents, "noextents"},
        {Opt_discard, "discard"},
-@@ -1919,6 +1921,9 @@
-                       }
-                       clear_opt(sb, EXTENTS);
+       {Opt_nodiscard, "nodiscard"},
+       {Opt_init_itable, "init_itable=%u"},
+@@ -1957,6 +1959,9 @@ set_qf_format:
+               case Opt_force_over_128tb:
+                       force_over_128tb = 1;
                        break;
 +              case Opt_no_mbcache:
 +                      set_opt(sb, NO_MBCACHE);
@@ -40,20 +42,21 @@ diff -ru linux-stage.orig/fs/ext4/super.c linux-stage/fs/ext4/super.c
                default:
                        ext4_msg(sb, KERN_ERR,
                               "Unrecognized mount option \"%s\" "
-diff -ru linux-stage.orig/fs/ext4/xattr.c linux-stage/fs/ext4/xattr.c
---- linux-stage.orig/fs/ext4/xattr.c   2012-12-31 15:58:19.000000000 -0500
-+++ linux-stage/fs/ext4/xattr.c        2012-12-31 16:46:21.000000000 -0500
+Index: linux-3.0.101-0.5/fs/ext4/xattr.c
+===================================================================
+--- linux-3.0.101-0.5.orig/fs/ext4/xattr.c
++++ linux-3.0.101-0.5/fs/ext4/xattr.c
 @@ -86,7 +86,8 @@
  # define ea_bdebug(f...)
  #endif
-
 -static void ext4_xattr_cache_insert(struct buffer_head *);
 +static void ext4_xattr_cache_insert(struct super_block *,
 +                                  struct buffer_head *);
  static struct buffer_head *ext4_xattr_cache_find(struct inode *,
                                                 struct ext4_xattr_header *,
                                                 struct mb_cache_entry **);
-@@ -332,7 +333,7 @@
+@@ -332,7 +333,7 @@ bad_block:
                error = -EIO;
                goto cleanup;
        }
@@ -62,19 +65,19 @@ diff -ru linux-stage.orig/fs/ext4/xattr.c linux-stage/fs/ext4/xattr.c
        entry = BFIRST(bh);
        error = ext4_xattr_find_entry(&entry, name_index, name, bh->b_size, 1,
                                      inode);
-@@ -492,7 +493,7 @@
+@@ -492,7 +493,7 @@ ext4_xattr_block_list(struct dentry *den
                error = -EIO;
                goto cleanup;
        }
 -      ext4_xattr_cache_insert(bh);
 +      ext4_xattr_cache_insert(inode->i_sb, bh);
        error = ext4_xattr_list_entries(dentry, BFIRST(bh), buffer, buffer_size);
-
  cleanup:
-@@ -589,7 +590,9 @@
+@@ -589,7 +590,9 @@ ext4_xattr_release_block(handle_t *handl
        struct mb_cache_entry *ce = NULL;
        int error = 0;
-
 -      ce = mb_cache_entry_get(ext4_xattr_cache, bh->b_bdev, bh->b_blocknr);
 +      if (!test_opt(inode->i_sb, NO_MBCACHE))
 +              ce = mb_cache_entry_get(ext4_xattr_cache, bh->b_bdev,
@@ -82,9 +85,9 @@ diff -ru linux-stage.orig/fs/ext4/xattr.c linux-stage/fs/ext4/xattr.c
        error = ext4_journal_get_write_access(handle, bh);
        if (error)
                goto out;
-@@ -989,8 +992,10 @@
+@@ -992,8 +995,10 @@ ext4_xattr_block_set(handle_t *handle, s
  #define header(x) ((struct ext4_xattr_header *)(x))
-
        if (s->base) {
 -              ce = mb_cache_entry_get(ext4_xattr_cache, bs->bh->b_bdev,
 -                                      bs->bh->b_blocknr);
@@ -95,7 +98,7 @@ diff -ru linux-stage.orig/fs/ext4/xattr.c linux-stage/fs/ext4/xattr.c
                error = ext4_journal_get_write_access(handle, bs->bh);
                if (error)
                        goto cleanup;
-@@ -1007,7 +1012,7 @@
+@@ -1010,7 +1015,7 @@ ext4_xattr_block_set(handle_t *handle, s
                                if (!IS_LAST_ENTRY(s->first))
                                        ext4_xattr_rehash(header(s->base),
                                                          s->here);
@@ -104,7 +107,7 @@ diff -ru linux-stage.orig/fs/ext4/xattr.c linux-stage/fs/ext4/xattr.c
                        }
                        unlock_buffer(bs->bh);
                        if (error == -EIO)
-@@ -1090,7 +1095,8 @@
+@@ -1093,7 +1098,8 @@ inserted:
                                if (error)
                                        goto cleanup_dquot;
                        }
@@ -114,7 +117,7 @@ diff -ru linux-stage.orig/fs/ext4/xattr.c linux-stage/fs/ext4/xattr.c
                        ce = NULL;
                } else if (bs->bh && s->base == bs->bh->b_data) {
                        /* We were modifying this block in-place. */
-@@ -1141,7 +1147,7 @@
+@@ -1144,7 +1150,7 @@ getblk_failed:
                        memcpy(new_bh->b_data, s->base, new_bh->b_size);
                        set_buffer_uptodate(new_bh);
                        unlock_buffer(new_bh);
@@ -123,7 +126,7 @@ diff -ru linux-stage.orig/fs/ext4/xattr.c linux-stage/fs/ext4/xattr.c
                        error = ext4_handle_dirty_metadata(handle,
                                                           inode, new_bh);
                        if (error)
-@@ -1761,12 +1767,15 @@
+@@ -1766,12 +1772,15 @@ ext4_xattr_put_super(struct super_block
   * Returns 0, or a negative error number on failure.
   */
  static void
@@ -133,17 +136,17 @@ diff -ru linux-stage.orig/fs/ext4/xattr.c linux-stage/fs/ext4/xattr.c
        __u32 hash = le32_to_cpu(BHDR(bh)->h_hash);
        struct mb_cache_entry *ce;
        int error;
-
 +      if (test_opt(sb, NO_MBCACHE))
 +              return;
 +
        ce = mb_cache_entry_alloc(ext4_xattr_cache, GFP_NOFS);
        if (!ce) {
                ea_bdebug(bh, "out of memory");
-@@ -1839,6 +1848,8 @@
+@@ -1844,6 +1853,8 @@ ext4_xattr_cache_find(struct inode *inod
        __u32 hash = le32_to_cpu(header->h_hash);
        struct mb_cache_entry *ce;
-
 +      if (test_opt(inode->i_sb, NO_MBCACHE))
 +              return NULL;
        if (!header->h_hash)
diff --git a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-extents-mount-option.patch b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-extents-mount-option.patch
deleted file mode 100644 (file)
index 5174912..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-diff -u -r linux-stage.orig/fs/ext4/ext4.h linux-stage/fs/ext4/ext4.h
---- linux-stage.orig/fs/ext4/ext4.h    2012-12-31 15:07:27.000000000 -0500
-+++ linux-stage/fs/ext4/ext4.h 2012-12-31 15:14:03.000000000 -0500
-@@ -912,6 +912,7 @@
- #define EXT4_MOUNT_POSIX_ACL          0x08000 /* POSIX Access Control Lists */
- #define EXT4_MOUNT_NO_AUTO_DA_ALLOC   0x10000 /* No auto delalloc mapping */
- #define EXT4_MOUNT_BARRIER            0x20000 /* Use block barriers */
-+#define EXT4_MOUNT_EXTENTS            0x40000 /* Extents support */
- #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 */
-diff -u -r linux-stage.orig/fs/ext4/ext4_jbd2.h linux-stage/fs/ext4/ext4_jbd2.h
---- linux-stage.orig/fs/ext4/ext4_jbd2.h       2012-12-31 15:07:27.000000000 -0500
-+++ linux-stage/fs/ext4/ext4_jbd2.h    2012-12-31 15:07:34.000000000 -0500
-@@ -33,7 +33,7 @@
-
- #define EXT4_SINGLEDATA_TRANS_BLOCKS(sb)                              \
-       (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)   \
--       ? 27U : 8U)
-+       || test_opt(sb, EXTENTS) ? 27U : 8U)
-
- #define ext4_journal_dirty_metadata(handle, bh)  \
-               ext4_handle_dirty_metadata(handle, NULL, bh)
-diff -u -r linux-stage.orig/fs/ext4/extents.c linux-stage/fs/ext4/extents.c
---- linux-stage.orig/fs/ext4/extents.c 2012-12-31 15:07:27.000000000 -0500
-+++ linux-stage/fs/ext4/extents.c      2012-12-31 15:07:34.000000000 -0500
-@@ -2733,7 +2733,7 @@
-        * possible initialization would be here
-        */
-
--      if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) {
-+      if (test_opt(sb, EXTENTS)) {
- #if defined(AGGRESSIVE_TEST) || defined(CHECK_BINSEARCH) || defined(EXTENTS_STATS)
-               printk(KERN_INFO "EXT4-fs: file extents enabled");
- #ifdef AGGRESSIVE_TEST
-@@ -2760,7 +2760,7 @@
-  */
- void ext4_ext_release(struct super_block *sb)
- {
--      if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS))
-+      if (!test_opt(sb, EXTENTS))
-               return;
-
- #ifdef EXTENTS_STATS
-diff -u -r linux-stage.orig/fs/ext4/ialloc.c linux-stage/fs/ext4/ialloc.c
---- linux-stage.orig/fs/ext4/ialloc.c  2012-12-31 15:07:27.000000000 -0500
-+++ linux-stage/fs/ext4/ialloc.c       2012-12-31 15:07:34.000000000 -0500
-@@ -1057,7 +1057,7 @@
-       if (err)
-               goto fail_free_drop;
-
--      if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) {
-+      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_set_inode_flag(inode, EXT4_INODE_EXTENTS);
-diff -u -r linux-stage.orig/fs/ext4/migrate.c linux-stage/fs/ext4/migrate.c
---- linux-stage.orig/fs/ext4/migrate.c 2012-12-31 15:07:27.000000000 -0500
-+++ linux-stage/fs/ext4/migrate.c      2012-12-31 15:07:34.000000000 -0500
-@@ -469,13 +469,10 @@
-       unsigned long max_entries;
-       __u32 goal;
-
--      /*
--       * If the filesystem does not support extents, or the inode
--       * already is extent-based, error out.
--       */
--      if (!EXT4_HAS_INCOMPAT_FEATURE(inode->i_sb,
--                                     EXT4_FEATURE_INCOMPAT_EXTENTS) ||
--          (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 (S_ISLNK(inode->i_mode) && inode->i_blocks == 0)
-diff -u -r linux-stage.orig/fs/ext4/super.c linux-stage/fs/ext4/super.c
---- linux-stage.orig/fs/ext4/super.c   2012-12-31 15:07:27.000000000 -0500
-+++ linux-stage/fs/ext4/super.c        2012-12-31 15:15:49.000000000 -0500
-@@ -1078,6 +1078,8 @@
-               seq_puts(seq, ",journal_async_commit");
-       else if (test_opt(sb, JOURNAL_CHECKSUM))
-               seq_puts(seq, ",journal_checksum");
-+      if (!test_opt(sb, EXTENTS))
-+              seq_puts(seq, ",noextents");
-       if (test_opt(sb, I_VERSION))
-               seq_puts(seq, ",i_version");
-       if (!test_opt(sb, DELALLOC) &&
-@@ -1303,6 +1305,7 @@
-       Opt_inode_readahead_blks, Opt_journal_ioprio,
-       Opt_dioread_nolock, Opt_dioread_lock,
-       Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb,
-+      Opt_extents, Opt_noextents,
-       Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable,
- };
-
-@@ -1380,6 +1383,8 @@
-       {Opt_bigendian_extents, "bigendian_extents"},
-       {Opt_force_over_128tb, "force_over_128tb"},
-       {Opt_mballoc, "mballoc"},
-+      {Opt_extents, "extents"},
-+      {Opt_noextents, "noextents"},
-       {Opt_discard, "discard"},
-       {Opt_nodiscard, "nodiscard"},
-       {Opt_init_itable, "init_itable=%u"},
-@@ -1472,6 +1477,7 @@
-       return 1;
- }
- #endif
-+      ext4_fsblk_t last_block;
-
- static int parse_options(char *options, struct super_block *sb,
-                        unsigned long *journal_devnum,
-@@ -1887,6 +1893,32 @@
-               case Opt_force_over_128tb:
-                       force_over_128tb = 1;
-                       break;
-+              case Opt_extents:
-+                      if (!EXT4_HAS_INCOMPAT_FEATURE(sb,
-+                                      EXT4_FEATURE_INCOMPAT_EXTENTS)) {
-+                              ext4_warning(sb, "extents feature not enabled "
-+                                               "on this filesystem, use tune2fs");
-+                              return 0;
-+                      }
-+                      set_opt(sb, EXTENTS);
-+                      break;
-+              case Opt_noextents:
-+                      /*
-+                       * When e2fsprogs support resizing an already existing
-+                       * ext4 file system to greater than 2**32 we need to
-+                       * add support to block allocator to handle growing
-+                       * already existing block  mapped inode so that blocks
-+                       * allocated for them fall within 2**32
-+                       */
-+                      last_block = ext4_blocks_count(sbi->s_es) - 1;
-+                      if (last_block  > 0xffffffffULL) {
-+                              printk(KERN_ERR "EXT4-fs: Filesystem too "
-+                                              "large to mount with "
-+                                              "-o noextents options\n");
-+                              return 0;
-+                      }
-+                      clear_opt(sb, EXTENTS);
-+                      break;
-               default:
-                       ext4_msg(sb, KERN_ERR,
-                              "Unrecognized mount option \"%s\" "
-@@ -3206,6 +3238,14 @@
-               set_opt(sb, BARRIER);
-
-       /*
-+       * turn on extents feature by default in ext4 filesystem
-+       * only if feature flag already set by mkfs or tune2fs.
-+       * Use -o noextents to turn it off
-+       */
-+      if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS))
-+              set_opt(sb, EXTENTS);
-+
-+      /*
-        * enable delayed allocation by default
-        * Use -o nodelalloc to turn it off
-        */
index 3f7db37..69b7962 100644 (file)
@@ -25,7 +25,6 @@ rhel6.3/ext4-osd-iop-common.patch
 rhel6.3/ext4-osd-iam-exports.patch
 rhel6.3/ext4-hash-indexed-dir-dotdot-update.patch
 rhel6.3/ext4-kill-dx_root.patch
-rhel6.3/ext4-extents-mount-option.patch
 rhel6.3/ext4-fiemap-2.6.patch
 rhel6.4/ext4-mballoc-pa_free-mismatch.patch
 rhel6.3/ext4-data-in-dirent.patch
index fbbac67..0f2ab19 100644 (file)
@@ -25,7 +25,6 @@ rhel6.3/ext4-osd-iop-common.patch
 rhel6.3/ext4-osd-iam-exports.patch
 rhel6.3/ext4-hash-indexed-dir-dotdot-update.patch
 rhel6.3/ext4-kill-dx_root.patch
-rhel6.3/ext4-extents-mount-option.patch
 rhel6.3/ext4-fiemap-2.6.patch
 rhel6.4/ext4-mballoc-pa_free-mismatch.patch
 rhel6.3/ext4-data-in-dirent.patch
index 5c819ea..c01c4e6 100644 (file)
@@ -25,7 +25,6 @@ rhel6.3/ext4-osd-iop-common.patch
 rhel6.3/ext4-osd-iam-exports.patch
 rhel6.3/ext4-hash-indexed-dir-dotdot-update.patch
 rhel6.3/ext4-kill-dx_root.patch
-rhel6.3/ext4-extents-mount-option.patch
 rhel6.3/ext4-fiemap-2.6.patch
 rhel6.3/ext4-mballoc-pa_free-mismatch.patch
 rhel6.3/ext4-data-in-dirent.patch
index 1fc8869..a593b5f 100644 (file)
@@ -26,7 +26,6 @@ rhel6.3/ext4-osd-iop-common.patch
 rhel6.3/ext4-osd-iam-exports.patch
 rhel6.3/ext4-hash-indexed-dir-dotdot-update.patch
 rhel6.3/ext4-kill-dx_root.patch
-rhel6.3/ext4-extents-mount-option.patch
 rhel6.3/ext4-fiemap-2.6.patch
 rhel6.3/ext4-mballoc-pa_free-mismatch.patch
 rhel6.3/ext4-data-in-dirent.patch
index e69fa59..6b8b5b9 100644 (file)
@@ -29,7 +29,6 @@ sles11sp2/ext4-osd-iop-common.patch
 rhel6.3/ext4-osd-iam-exports.patch
 rhel6.3/ext4-hash-indexed-dir-dotdot-update.patch
 sles11sp2/ext4-kill-dx_root.patch
-sles11sp2/ext4-extents-mount-option.patch
 rhel6.3/ext4-fiemap-2.6.patch
 sles11sp2/ext4-mballoc-pa_free-mismatch.patch
 sles11sp2/ext4-data-in-dirent.patch
index a2e6fef..8e00520 100644 (file)
@@ -823,7 +823,7 @@ static int osd_ldiskfs_map_inode_pages(struct inode *inode, struct page **page,
 {
        int rc;
 
-       if (LDISKFS_I(inode)->i_flags & LDISKFS_EXTENTS_FL) {
+       if (ldiskfs_test_inode_flag(inode, LDISKFS_INODE_EXTENTS)) {
                rc = osd_ldiskfs_map_ext_inode_pages(inode, page, pages,
                                                     blocks, create);
                return rc;
@@ -991,7 +991,7 @@ static int osd_declare_write_commit(const struct lu_env *env,
          * 5 is max tree depth: inode + 4 index blocks
          * with blockmaps, depth is 3 at most
          */
-        if (LDISKFS_I(inode)->i_flags & LDISKFS_EXTENTS_FL) {
+       if (ldiskfs_test_inode_flag(inode, LDISKFS_INODE_EXTENTS)) {
                 /*
                  * many concurrent threads may grow tree by the time
                  * our transaction starts. so, consider 2 is a min depth
@@ -1310,11 +1310,11 @@ static inline int osd_extents_enabled(struct super_block *sb,
                                      struct inode *inode)
 {
        if (inode != NULL) {
-               if (LDISKFS_I(inode)->i_flags & LDISKFS_EXTENTS_FL)
+               if (ldiskfs_test_inode_flag(inode, LDISKFS_INODE_EXTENTS))
                        return 1;
-       } else if (test_opt(sb, EXTENTS)) {
+       } else if (LDISKFS_HAS_INCOMPAT_FEATURE(sb,
+                                       LDISKFS_FEATURE_INCOMPAT_EXTENTS))
                return 1;
-       }
        return 0;
 }