Whamcloud - gitweb
b=16226 (patch by bzzz)
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext3-mballoc3-core.patch
index 5ef1f7d..2052b65 100644 (file)
@@ -1,8 +1,8 @@
-Index: linux-2.6.18-53.1.14/include/linux/ext3_fs.h
+Index: linux-2.6.5-7.311/include/linux/ext3_fs.h
 ===================================================================
---- linux-2.6.18-53.1.14.orig/include/linux/ext3_fs.h
-+++ linux-2.6.18-53.1.14/include/linux/ext3_fs.h
-@@ -53,6 +53,30 @@
+--- linux-2.6.5-7.311.orig/include/linux/ext3_fs.h
++++ linux-2.6.5-7.311/include/linux/ext3_fs.h
+@@ -57,6 +57,30 @@ struct statfs;
  #define ext3_debug(f, a...)   do {} while (0)
  #endif
  
@@ -33,7 +33,7 @@ Index: linux-2.6.18-53.1.14/include/linux/ext3_fs.h
  /*
   * Special inodes numbers
   */
-@@ -398,6 +422,14 @@ struct ext3_inode {
+@@ -361,6 +385,14 @@ struct ext3_inode {
  #define ext3_find_first_zero_bit      ext2_find_first_zero_bit
  #define ext3_find_next_zero_bit               ext2_find_next_zero_bit
  
@@ -48,7 +48,7 @@ Index: linux-2.6.18-53.1.14/include/linux/ext3_fs.h
  /*
   * Maximal mount counts between two filesystem checks
   */
-@@ -799,6 +831,20 @@ extern unsigned long ext3_count_dirs (st
+@@ -735,6 +767,20 @@ extern unsigned long ext3_count_dirs (st
  extern void ext3_check_inodes_bitmap (struct super_block *);
  extern unsigned long ext3_count_free (struct buffer_head *, unsigned);
  
@@ -68,9 +68,9 @@ Index: linux-2.6.18-53.1.14/include/linux/ext3_fs.h
 +
  
  /* inode.c */
int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode,
-@@ -843,6 +889,10 @@ extern int ext3_group_extend(struct supe
-                               ext3_fsblk_t n_blocks_count);
extern int ext3_block_truncate_page(handle_t *, struct page *,
+@@ -769,6 +815,10 @@ extern int ext3_htree_fill_tree(struct f
+                               __u32 start_minor_hash, __u32 *next_hash);
  
  /* super.c */
 +extern struct proc_dir_entry *proc_root_ext3;
@@ -80,13 +80,13 @@ Index: linux-2.6.18-53.1.14/include/linux/ext3_fs.h
  extern void ext3_error (struct super_block *, const char *, const char *, ...)
        __attribute__ ((format (printf, 3, 4)));
  extern void __ext3_std_error (struct super_block *, const char *, int);
-Index: linux-2.6.18-53.1.14/include/linux/ext3_fs_sb.h
+Index: linux-2.6.5-7.311/include/linux/ext3_fs_sb.h
 ===================================================================
---- linux-2.6.18-53.1.14.orig/include/linux/ext3_fs_sb.h
-+++ linux-2.6.18-53.1.14/include/linux/ext3_fs_sb.h
-@@ -88,6 +88,61 @@ struct ext3_sb_info {
-       unsigned long s_ext_blocks;
-       unsigned long s_ext_extents;
+--- linux-2.6.5-7.311.orig/include/linux/ext3_fs_sb.h
++++ linux-2.6.5-7.311/include/linux/ext3_fs_sb.h
+@@ -78,6 +78,61 @@ struct ext3_sb_info {
+       struct timer_list turn_ro_timer;        /* For turning read-only (crash simulation) */
+       wait_queue_head_t ro_wait_queue;        /* For people waiting for the fs to go read-only */
  #endif
 +
 +      /* for buddy allocator */
@@ -146,11 +146,11 @@ Index: linux-2.6.18-53.1.14/include/linux/ext3_fs_sb.h
 +                               [(group) & (EXT3_DESC_PER_BLOCK(sb) - 1)]
 +
  #endif        /* _LINUX_EXT3_FS_SB */
-Index: linux-2.6.18-53.1.14/fs/ext3/super.c
+Index: linux-2.6.5-7.311/fs/ext3/super.c
 ===================================================================
---- linux-2.6.18-53.1.14.orig/fs/ext3/super.c
-+++ linux-2.6.18-53.1.14/fs/ext3/super.c
-@@ -391,6 +391,7 @@ static void ext3_put_super (struct super
+--- linux-2.6.5-7.311.orig/fs/ext3/super.c
++++ linux-2.6.5-7.311/fs/ext3/super.c
+@@ -389,6 +389,7 @@ void ext3_put_super (struct super_block 
        struct ext3_super_block *es = sbi->s_es;
        int i;
  
@@ -158,7 +158,7 @@ Index: linux-2.6.18-53.1.14/fs/ext3/super.c
        ext3_ext_release(sb);
        ext3_xattr_put_super(sb);
        journal_destroy(sbi->s_journal);
-@@ -433,6 +434,8 @@ static void ext3_put_super (struct super
+@@ -428,6 +429,8 @@ void ext3_put_super (struct super_block 
                invalidate_bdev(sbi->journal_bdev, 0);
                ext3_blkdev_remove(sbi);
        }
@@ -167,16 +167,16 @@ Index: linux-2.6.18-53.1.14/fs/ext3/super.c
        sb->s_fs_info = NULL;
        kfree(sbi);
        return;
-@@ -458,6 +461,8 @@ static struct inode *ext3_alloc_inode(st
+@@ -453,6 +456,8 @@ static struct inode *ext3_alloc_inode(st
        ei->vfs_inode.i_version = 1;
+       
        memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent));
 +      INIT_LIST_HEAD(&ei->i_prealloc_list);
 +      spin_lock_init(&ei->i_prealloc_lock);
        return &ei->vfs_inode;
  }
  
-@@ -1454,6 +1459,13 @@ static int ext3_fill_super (struct super
+@@ -1151,6 +1156,13 @@ static int ext3_fill_super (struct super
        sbi->s_mount_opt = 0;
        sbi->s_resuid = EXT3_DEF_RESUID;
        sbi->s_resgid = EXT3_DEF_RESGID;
@@ -188,9 +188,9 @@ Index: linux-2.6.18-53.1.14/fs/ext3/super.c
 +              return -ENOMEM;
 +      }
  
-       unlock_kernel();
-@@ -1857,6 +1869,8 @@ failed_mount:
+       blocksize = sb_min_blocksize(sb, EXT3_MIN_BLOCK_SIZE);
+       if (!blocksize) {
+@@ -1526,6 +1538,8 @@ failed_mount:
        ext3_blkdev_remove(sbi);
        brelse(bh);
  out_fail:
@@ -198,8 +198,8 @@ Index: linux-2.6.18-53.1.14/fs/ext3/super.c
 +      sbi->s_dev_proc = NULL;
        sb->s_fs_info = NULL;
        kfree(sbi);
-       lock_kernel();
-@@ -2782,9 +2796,46 @@ static struct file_system_type ext3_fs_t
+       return -EINVAL;
+@@ -2158,9 +2172,46 @@ static struct file_system_type ext3_fs_t
        .fs_flags       = FS_REQUIRES_DEV,
  };
  
@@ -247,7 +247,7 @@ Index: linux-2.6.18-53.1.14/fs/ext3/super.c
        if (err)
                return err;
        err = init_inodecache();
-@@ -2806,6 +2858,7 @@ static void __exit exit_ext3_fs(void)
+@@ -2189,6 +2240,7 @@ static void __exit exit_ext3_fs(void)
        unregister_filesystem(&ext3_fs_type);
        destroy_inodecache();
        exit_ext3_xattr();
@@ -255,11 +255,11 @@ Index: linux-2.6.18-53.1.14/fs/ext3/super.c
  }
  
  int ext3_map_inode_page(struct inode *inode, struct page *page,
-Index: linux-2.6.18-53.1.14/fs/ext3/mballoc.c
+Index: linux-2.6.5-7.311/fs/ext3/mballoc.c
 ===================================================================
 --- /dev/null
-+++ linux-2.6.18-53.1.14/fs/ext3/mballoc.c
-@@ -0,0 +1,4382 @@
++++ linux-2.6.5-7.311/fs/ext3/mballoc.c
+@@ -0,0 +1,4385 @@
 +/*
 + * Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com
 + * Written by Alex Tomas <alex@clusterfs.com>
@@ -4642,3 +4642,6 @@ Index: linux-2.6.18-53.1.14/fs/ext3/mballoc.c
 +      ext3_std_error(sb, err);
 +      return;
 +}
++
++EXPORT_SYMBOL(ext3_free_blocks);
++EXPORT_SYMBOL(ext3_mb_discard_inode_preallocations);