Whamcloud - gitweb
Branch b1_6
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext3-mballoc3-2.6.18.patch
index 04eb2a2..0cae328 100644 (file)
@@ -1,7 +1,7 @@
 Index: linux-2.6.18.8/include/linux/ext3_fs_i.h
 ===================================================================
---- linux-2.6.18.8.orig/include/linux/ext3_fs_i.h      2007-06-21 14:20:14.000000000 +0200
-+++ linux-2.6.18.8/include/linux/ext3_fs_i.h   2007-06-21 14:20:15.000000000 +0200
+--- linux-2.6.18.8.orig/include/linux/ext3_fs_i.h      2007-07-17 09:18:14.000000000 +0200
++++ linux-2.6.18.8/include/linux/ext3_fs_i.h   2007-07-17 09:18:53.000000000 +0200
 @@ -154,6 +154,10 @@ struct ext3_inode_info {
        struct inode vfs_inode;
  
@@ -15,8 +15,8 @@ Index: linux-2.6.18.8/include/linux/ext3_fs_i.h
  #endif        /* _LINUX_EXT3_FS_I */
 Index: linux-2.6.18.8/include/linux/ext3_fs_sb.h
 ===================================================================
---- linux-2.6.18.8.orig/include/linux/ext3_fs_sb.h     2007-06-21 14:20:15.000000000 +0200
-+++ linux-2.6.18.8/include/linux/ext3_fs_sb.h  2007-06-21 14:20:15.000000000 +0200
+--- linux-2.6.18.8.orig/include/linux/ext3_fs_sb.h     2007-07-17 09:18:14.000000000 +0200
++++ linux-2.6.18.8/include/linux/ext3_fs_sb.h  2007-07-17 09:18:53.000000000 +0200
 @@ -21,8 +21,15 @@
  #include <linux/wait.h>
  #include <linux/blockgroup_lock.h>
@@ -35,8 +35,8 @@ Index: linux-2.6.18.8/include/linux/ext3_fs_sb.h
   * third extended-fs super-block data in memory
 Index: linux-2.6.18.8/include/linux/ext3_fs.h
 ===================================================================
---- linux-2.6.18.8.orig/include/linux/ext3_fs.h        2007-06-21 14:20:15.000000000 +0200
-+++ linux-2.6.18.8/include/linux/ext3_fs.h     2007-06-21 14:20:15.000000000 +0200
+--- linux-2.6.18.8.orig/include/linux/ext3_fs.h        2007-07-17 09:18:14.000000000 +0200
++++ linux-2.6.18.8/include/linux/ext3_fs.h     2007-07-17 09:18:53.000000000 +0200
 @@ -17,6 +17,7 @@
  #define _LINUX_EXT3_FS_H
  
@@ -138,8 +138,8 @@ Index: linux-2.6.18.8/include/linux/ext3_fs.h
  int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode,
 Index: linux-2.6.18.8/fs/ext3/super.c
 ===================================================================
---- linux-2.6.18.8.orig/fs/ext3/super.c        2007-06-21 14:20:15.000000000 +0200
-+++ linux-2.6.18.8/fs/ext3/super.c     2007-06-21 14:20:15.000000000 +0200
+--- linux-2.6.18.8.orig/fs/ext3/super.c        2007-07-17 09:18:14.000000000 +0200
++++ linux-2.6.18.8/fs/ext3/super.c     2007-07-17 09:18:53.000000000 +0200
 @@ -688,6 +688,7 @@ enum {
        Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
        Opt_grpquota,
@@ -188,8 +188,8 @@ Index: linux-2.6.18.8/fs/ext3/super.c
        return 0;
 Index: linux-2.6.18.8/fs/ext3/extents.c
 ===================================================================
---- linux-2.6.18.8.orig/fs/ext3/extents.c      2007-06-21 14:20:14.000000000 +0200
-+++ linux-2.6.18.8/fs/ext3/extents.c   2007-06-21 14:20:15.000000000 +0200
+--- linux-2.6.18.8.orig/fs/ext3/extents.c      2007-07-17 09:18:14.000000000 +0200
++++ linux-2.6.18.8/fs/ext3/extents.c   2007-07-17 09:18:53.000000000 +0200
 @@ -795,7 +795,7 @@ cleanup:
                for (i = 0; i < depth; i++) {
                        if (!ablocks[i])
@@ -324,8 +324,8 @@ Index: linux-2.6.18.8/fs/ext3/extents.c
         * probably we need not scaning at all,
 Index: linux-2.6.18.8/fs/ext3/Makefile
 ===================================================================
---- linux-2.6.18.8.orig/fs/ext3/Makefile       2007-06-21 14:20:14.000000000 +0200
-+++ linux-2.6.18.8/fs/ext3/Makefile    2007-06-21 14:20:15.000000000 +0200
+--- linux-2.6.18.8.orig/fs/ext3/Makefile       2007-07-17 09:18:14.000000000 +0200
++++ linux-2.6.18.8/fs/ext3/Makefile    2007-07-17 09:18:53.000000000 +0200
 @@ -5,7 +5,7 @@
  obj-$(CONFIG_EXT3_FS) += ext3.o
  
@@ -337,8 +337,8 @@ Index: linux-2.6.18.8/fs/ext3/Makefile
  ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
 Index: linux-2.6.18.8/fs/ext3/xattr.c
 ===================================================================
---- linux-2.6.18.8.orig/fs/ext3/xattr.c        2007-06-21 10:31:07.000000000 +0200
-+++ linux-2.6.18.8/fs/ext3/xattr.c     2007-06-21 14:20:15.000000000 +0200
+--- linux-2.6.18.8.orig/fs/ext3/xattr.c        2007-02-24 00:52:30.000000000 +0100
++++ linux-2.6.18.8/fs/ext3/xattr.c     2007-07-17 09:18:53.000000000 +0200
 @@ -484,7 +484,7 @@ ext3_xattr_release_block(handle_t *handl
                ea_bdebug(bh, "refcount now=0; freeing");
                if (ce)
@@ -359,8 +359,8 @@ Index: linux-2.6.18.8/fs/ext3/xattr.c
                        }
 Index: linux-2.6.18.8/fs/ext3/balloc.c
 ===================================================================
---- linux-2.6.18.8.orig/fs/ext3/balloc.c       2007-06-21 10:31:07.000000000 +0200
-+++ linux-2.6.18.8/fs/ext3/balloc.c    2007-06-21 14:20:15.000000000 +0200
+--- linux-2.6.18.8.orig/fs/ext3/balloc.c       2007-02-24 00:52:30.000000000 +0100
++++ linux-2.6.18.8/fs/ext3/balloc.c    2007-07-17 09:18:53.000000000 +0200
 @@ -79,7 +79,7 @@ struct ext3_group_desc * ext3_get_group_
   *
   * Return buffer_head on success or NULL in case of failure.
@@ -436,8 +436,8 @@ Index: linux-2.6.18.8/fs/ext3/balloc.c
        unsigned long count = 1;
 Index: linux-2.6.18.8/fs/ext3/inode.c
 ===================================================================
---- linux-2.6.18.8.orig/fs/ext3/inode.c        2007-06-21 14:20:14.000000000 +0200
-+++ linux-2.6.18.8/fs/ext3/inode.c     2007-06-21 14:20:15.000000000 +0200
+--- linux-2.6.18.8.orig/fs/ext3/inode.c        2007-07-17 09:18:14.000000000 +0200
++++ linux-2.6.18.8/fs/ext3/inode.c     2007-07-17 09:18:53.000000000 +0200
 @@ -560,7 +560,7 @@ static int ext3_alloc_blocks(handle_t *h
        return ret;
  failed_out:
@@ -492,8 +492,8 @@ Index: linux-2.6.18.8/fs/ext3/inode.c
                                /*
 Index: linux-2.6.18.8/fs/ext3/mballoc.c
 ===================================================================
---- linux-2.6.18.8.orig/fs/ext3/mballoc.c      2007-06-21 14:20:15.000000000 +0200
-+++ linux-2.6.18.8/fs/ext3/mballoc.c   2007-06-21 14:24:19.000000000 +0200
+--- linux-2.6.18.8.orig/fs/ext3/mballoc.c      2007-07-17 09:18:14.000000000 +0200
++++ linux-2.6.18.8/fs/ext3/mballoc.c   2007-07-17 09:23:56.000000000 +0200
 @@ -350,8 +350,8 @@ struct ext3_prealloc_space {
        spinlock_t              pa_lock;
        atomic_t                pa_count;
@@ -541,7 +541,7 @@ Index: linux-2.6.18.8/fs/ext3/mballoc.c
                        + fex->fe_start
                        + le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block);
        return block;
-@@ -3188,7 +3188,7 @@ void ext3_mb_collect_stats(struct ext3_a
+@@ -3174,7 +3174,7 @@ void ext3_mb_collect_stats(struct ext3_a
  void ext3_mb_use_inode_pa(struct ext3_allocation_context *ac,
                                struct ext3_prealloc_space *pa)
  {
@@ -550,7 +550,7 @@ Index: linux-2.6.18.8/fs/ext3/mballoc.c
  
        /* found preallocated blocks, use them */
        start = pa->pa_pstart + (ac->ac_o_ex.fe_logical - pa->pa_lstart);
-@@ -4041,13 +4041,13 @@ int ext3_mb_discard_preallocations(struc
+@@ -4027,13 +4027,13 @@ int ext3_mb_discard_preallocations(struc
   * it tries to use preallocation first, then falls back
   * to usual allocation
   */
@@ -561,24 +561,23 @@ Index: linux-2.6.18.8/fs/ext3/mballoc.c
        struct ext3_allocation_context ac;
        struct ext3_sb_info *sbi;
        struct super_block *sb;
--      unsigned long block;
-+      ext3_fsblk_t block;
-       int err, freed;
+-      unsigned long block = 0;
++      ext3_fsblk_t block = 0;
+       int freed, inquota;
  
        sb = ar->inode->i_sb;
-@@ -4058,9 +4058,8 @@ unsigned long ext3_mb_new_blocks(handle_
+@@ -4044,8 +4044,8 @@ unsigned long ext3_mb_new_blocks(handle_
                if (ext3_mballoc_warning++ == 0)
                        printk(KERN_ERR "EXT3-fs: multiblock request with "
                                        "mballoc disabled!\n");
 -              ar->len = 1;
--              err = ext3_new_block_old(handle, ar->inode, ar->goal, errp);
--              return err;
-+              return ext3_new_blocks_old(handle, ar->inode, ar->goal,
-+                                         &ar->len, errp);
+-              block = ext3_new_block_old(handle, ar->inode, ar->goal, errp);
++              block = ext3_new_blocks_old(handle, ar->inode, ar->goal,
++                                          &ar->len, errp);
+               return block;
        }
  
-       ext3_mb_poll_new_transaction(sb, handle);
-@@ -4107,11 +4106,11 @@ repeat:
+@@ -4109,11 +4109,11 @@ out:
  }
  EXPORT_SYMBOL(ext3_mb_new_blocks);
  
@@ -593,7 +592,7 @@ Index: linux-2.6.18.8/fs/ext3/mballoc.c
  
        if (!test_opt(inode->i_sb, MBALLOC)) {
                ret = ext3_new_block_old(handle, inode, goal, errp);
-@@ -4226,8 +4225,8 @@ int ext3_mb_free_metadata(handle_t *hand
+@@ -4228,8 +4228,8 @@ int ext3_mb_free_metadata(handle_t *hand
   * Main entry point into mballoc to free blocks
   */
  void ext3_mb_free_blocks(handle_t *handle, struct inode *inode,