Whamcloud - gitweb
Branch b1_6
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / ext3-mballoc2-2.6.12.patch
index d4d0a05..ad07714 100644 (file)
@@ -25,7 +25,7 @@ Index: linux-2.6.12.6-bull/include/linux/ext3_fs.h
  
  /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
  #ifndef clear_opt
-@@ -387,6 +396,14 @@
+@@ -387,6 +396,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
  
@@ -40,12 +40,13 @@ Index: linux-2.6.12.6-bull/include/linux/ext3_fs.h
  /*
   * Maximal mount counts between two filesystem checks
   */
-@@ -727,7 +736,7 @@ extern int ext3_bg_has_super(struct supe
+@@ -727,7 +736,8 @@ extern int ext3_bg_has_super(struct supe
  extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group);
  extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *);
  extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long,
 -                            unsigned long);
 +                            unsigned long, int);
++extern int ext3_new_block_old(handle_t *, struct inode *, unsigned long, int *);
  extern void ext3_free_blocks_sb (handle_t *, struct super_block *,
                                 unsigned long, unsigned long, int *);
  extern unsigned long ext3_count_free_blocks (struct super_block *);
@@ -360,7 +361,7 @@ Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c
 ===================================================================
 --- linux-2.6.12.6-bull.orig/fs/ext3/mballoc.c 2006-04-22 17:31:47.543334750 +0400
 +++ linux-2.6.12.6-bull/fs/ext3/mballoc.c      2006-04-30 01:24:11.000000000 +0400
-@@ -0,0 +1,2729 @@
+@@ -0,0 +1,2725 @@
 +/*
 + * Copyright (c) 2003-2005, Cluster File Systems, Inc, info@clusterfs.com
 + * Written by Alex Tomas <alex@clusterfs.com>
@@ -468,7 +469,7 @@ Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c
 +
 +struct ext3_group_info {
 +      unsigned long   bb_state;
-+      unsigned long   bb_tid;
++      unsigned long   bb_tid;
 +      struct ext3_free_metadata *bb_md_cur;
 +      unsigned short  bb_first_free;
 +      unsigned short  bb_free;
@@ -504,7 +505,7 @@ Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c
 +      __u16 ac_found;
 +      __u16 ac_tail;
 +      __u16 ac_buddy;
-+      __u8 ac_status; 
++      __u8 ac_status;
 +      __u8 ac_flags;          /* allocation hints */
 +      __u8 ac_criteria;
 +      __u8 ac_repeats;
@@ -556,11 +557,7 @@ Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c
 +
 +static struct proc_dir_entry *proc_root_ext3;
 +
-+int ext3_create (struct inode *, struct dentry *, int, struct nameidata *);
 +struct buffer_head * read_block_bitmap(struct super_block *, unsigned int);
-+int ext3_new_block_old(handle_t *, struct inode *, unsigned long, int *);
-+int ext3_mb_reserve_blocks(struct super_block *, int);
-+void ext3_mb_release_blocks(struct super_block *, int);
 +void ext3_mb_poll_new_transaction(struct super_block *, handle_t *);
 +void ext3_mb_free_committed_blocks(struct super_block *);
 +
@@ -1565,11 +1562,11 @@ Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c
 +      J_ASSERT(sbi->s_stripe != 0);
 +
 +      /* find first stripe-aligned block */
-+      i = e3b->bd_group * EXT3_BLOCKS_PER_GROUP(sb)
-+              le32_to_cpu(sbi->s_es->s_first_data_block);
++      i = e3b->bd_group * EXT3_BLOCKS_PER_GROUP(sb) +
++              le32_to_cpu(sbi->s_es->s_first_data_block);
 +      i = ((i + sbi->s_stripe - 1) / sbi->s_stripe) * sbi->s_stripe;
-+      i = (i - le32_to_cpu(sbi->s_es->s_first_data_block))
-+                      % EXT3_BLOCKS_PER_GROUP(sb);
++      i = (i - le32_to_cpu(sbi->s_es->s_first_data_block)) %
++              EXT3_BLOCKS_PER_GROUP(sb);
 +
 +      while (i < sb->s_blocksize * 8) {
 +              if (!mb_test_bit(i, bitmap)) {
@@ -2070,7 +2067,7 @@ Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c
 +              return -EIO;
 +      size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
 +      s->history = kmalloc(size, GFP_KERNEL);
-+      if (s == NULL) {
++      if (s->history == NULL) {
 +              kfree(s);
 +              return -EIO;
 +      }
@@ -2918,7 +2915,7 @@ Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c
 +      if (value <= 0)
 +              return -ERANGE;
 +
-+      ext3_mb_max_to_scan = value;    
++      ext3_mb_max_to_scan = value;
 +
 +      return count;
 +}
@@ -2957,7 +2954,7 @@ Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c
 +      if (value <= 0)
 +              return -ERANGE;
 +
-+      ext3_mb_min_to_scan = value;    
++      ext3_mb_min_to_scan = value;
 +
 +      return count;
 +}
@@ -2996,7 +2993,7 @@ Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c
 +      if (value <= 0)
 +              return -ERANGE;
 +
-+      ext3_mb_order2_reqs = value;    
++      ext3_mb_order2_reqs = value;
 +
 +      return count;
 +}