-Index: linux-stage/fs/ext3/mballoc.c
+Index: linux-2.6.5-sles9/fs/ext3/mballoc.c
===================================================================
---- linux-stage.orig/fs/ext3/mballoc.c 2003-01-30 05:24:37.000000000 -0500
-+++ linux-stage/fs/ext3/mballoc.c 2004-10-13 17:06:53.000000000 -0400
-@@ -0,0 +1,1397 @@
+--- linux-2.6.5-sles9.orig/fs/ext3/mballoc.c 2003-01-30 13:24:37.000000000 +0300
++++ linux-2.6.5-sles9/fs/ext3/mballoc.c 2004-11-09 02:34:25.181340632 +0300
+@@ -0,0 +1,1428 @@
+/*
+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com
+ * Written by Alex Tomas <alex@clusterfs.com>
+int ext3_create (struct inode *, struct dentry *, int, struct nameidata *);
+struct buffer_head * read_block_bitmap(struct super_block *, unsigned int);
+void ext3_free_blocks_old(handle_t *, struct inode *, unsigned long, unsigned long);
-+int ext3_new_block_old(handle_t *, struct inode *, unsigned long, u32 *, u32 *, 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 *);
+
++#define mb_correct_addr_and_bit(bit,addr) \
++{ \
++ if ((unsigned) addr & 1) { \
++ bit += 8; \
++ addr--; \
++ } \
++ if ((unsigned) addr & 2) { \
++ bit += 16; \
++ addr--; \
++ addr--; \
++ } \
++}
++
++static inline int mb_test_bit(int bit, void *addr)
++{
++ mb_correct_addr_and_bit(bit,addr);
++ return test_bit(bit, addr);
++}
++
++static inline void mb_set_bit(int bit, void *addr)
++{
++ mb_correct_addr_and_bit(bit,addr);
++ set_bit(bit, addr);
++}
++
++static inline void mb_clear_bit(int bit, void *addr)
++{
++ mb_correct_addr_and_bit(bit,addr);
++ clear_bit(bit, addr);
++}
++
+static inline void *mb_find_buddy(struct ext3_buddy *e3b, int order, int *max)
+{
+ int i = 1;
+ count = 0;
+ for (i = 0; i < max; i++) {
+
-+ if (!test_bit(i, buddy)) {
++ if (!mb_test_bit(i, buddy)) {
+ /* only single bit in buddy2 may be 1 */
-+ if (test_bit(i << 1, buddy2))
-+ J_ASSERT(!test_bit((i<<1)+1, buddy2));
-+ else if (test_bit((i << 1) + 1, buddy2))
-+ J_ASSERT(!test_bit(i << 1, buddy2));
++ if (mb_test_bit(i << 1, buddy2))
++ J_ASSERT(!mb_test_bit((i<<1)+1, buddy2));
++ else if (mb_test_bit((i << 1) + 1, buddy2))
++ J_ASSERT(!mb_test_bit(i << 1, buddy2));
+ continue;
+ }
+
+ /* both bits in buddy2 must be 0 */
-+ J_ASSERT(!test_bit(i << 1, buddy2));
-+ J_ASSERT(!test_bit((i << 1) + 1, buddy2));
++ J_ASSERT(!mb_test_bit(i << 1, buddy2));
++ J_ASSERT(!mb_test_bit((i << 1) + 1, buddy2));
+
+ for (j = 0; j < (1 << order); j++) {
+ k = (i * (1 << order)) + j;
-+ J_ASSERT(test_bit(k, e3b->bd_bitmap));
++ J_ASSERT(mb_test_bit(k, e3b->bd_bitmap));
+ }
+ count++;
+ }
+
+ buddy = mb_find_buddy(e3b, 0, &max);
+ for (i = 0; i < max; i++) {
-+ if (test_bit(i, buddy))
++ if (mb_test_bit(i, buddy))
+ continue;
+ /* check used bits only */
+ for (j = 0; j < e3b->bd_blkbits + 1; j++) {
+ buddy2 = mb_find_buddy(e3b, j, &max2);
+ k = i >> j;
+ J_ASSERT(k < max2);
-+ J_ASSERT(!test_bit(k, buddy2));
++ J_ASSERT(!mb_test_bit(k, buddy2));
+ }
+ }
+}
+ bb = e3b->bd_buddy;
+ while (order <= e3b->bd_blkbits + 1) {
+ block = block >> 1;
-+ if (test_bit(block, bb)) {
++ if (mb_test_bit(block, bb)) {
+ /* this block is part of buddy of order 'order' */
+ return order;
+ }
+ cur += 32;
+ continue;
+ }
-+ clear_bit(cur, bm);
++ mb_clear_bit(cur, bm);
+ cur++;
+ }
+}
+ cur += 32;
+ continue;
+ }
-+ set_bit(cur, bm);
++ mb_set_bit(cur, bm);
+ cur++;
+ }
+}
+ block = first++;
+ order = 0;
+
-+ J_ASSERT(!test_bit(block, e3b->bd_bitmap));
-+ set_bit(block, e3b->bd_bitmap);
++ J_ASSERT(!mb_test_bit(block, e3b->bd_bitmap));
++ mb_set_bit(block, e3b->bd_bitmap);
+ e3b->bd_bd->bb_counters[order]++;
+
+ /* start of the buddy */
+
+ do {
+ block &= ~1UL;
-+ if (!test_bit(block, buddy) ||
-+ !test_bit(block + 1, buddy))
++ if (!mb_test_bit(block, buddy) ||
++ !mb_test_bit(block + 1, buddy))
+ break;
+
+ /* both the buddies are free, try to coalesce them */
+ if (order > 0) {
+ /* for special purposes, we don't clear
+ * free bits in bitmap */
-+ clear_bit(block, buddy);
-+ clear_bit(block + 1, buddy);
++ mb_clear_bit(block, buddy);
++ mb_clear_bit(block + 1, buddy);
+ }
+ e3b->bd_bd->bb_counters[order]--;
+ e3b->bd_bd->bb_counters[order]--;
+ order++;
+ e3b->bd_bd->bb_counters[order]++;
+
-+ set_bit(block, buddy2);
++ mb_set_bit(block, buddy2);
+ buddy = buddy2;
+ } while (1);
+ }
+ buddy = mb_find_buddy(e3b, order, &max);
+ J_ASSERT(buddy);
+ J_ASSERT(block < max);
-+ if (!test_bit(block, buddy))
++ if (!mb_test_bit(block, buddy))
+ goto nofree;
+
+ if (order == 0) {
+ break;
+
+ next = (block + 1) * (1 << order);
-+ if (!test_bit(next, e3b->bd_bitmap))
++ if (!mb_test_bit(next, e3b->bd_bitmap))
+ break;
+
+ ord = mb_find_order_for_block(e3b, next);
+ mlen = 1 << ord;
+ buddy = mb_find_buddy(e3b, ord, &max);
+ J_ASSERT((start >> ord) < max);
-+ clear_bit(start >> ord, buddy);
++ mb_clear_bit(start >> ord, buddy);
+ e3b->bd_bd->bb_counters[ord]--;
+ start -= mlen;
+ len -= mlen;
+ /* we have to split large buddy */
+ J_ASSERT(ord > 0);
+ buddy = mb_find_buddy(e3b, ord, &max);
-+ clear_bit(start >> ord, buddy);
++ mb_clear_bit(start >> ord, buddy);
+ e3b->bd_bd->bb_counters[ord]--;
+
+ ord--;
+ cur = (start >> ord) & ~1U;
+ buddy = mb_find_buddy(e3b, ord, &max);
-+ set_bit(cur, buddy);
-+ set_bit(cur + 1, buddy);
++ mb_set_bit(cur, buddy);
++ mb_set_bit(cur + 1, buddy);
+ e3b->bd_bd->bb_counters[ord]++;
+ e3b->bd_bd->bb_counters[ord]++;
+ }
+ mlen = 1 << ord;
+ buddy = mb_find_buddy(e3b, ord, &max);
+ J_ASSERT((start >> ord) < max);
-+ clear_bit(start >> ord, buddy);
++ mb_clear_bit(start >> ord, buddy);
+ e3b->bd_bd->bb_counters[ord]--;
+ start += mlen;
+ len -= mlen;
+ /* we have to split large buddy */
+ J_ASSERT(ord > 0);
+ buddy = mb_find_buddy(e3b, ord, &max);
-+ clear_bit(start >> ord, buddy);
++ mb_clear_bit(start >> ord, buddy);
+ e3b->bd_bd->bb_counters[ord]--;
+
+ ord--;
+ cur = (start >> ord) & ~1U;
+ buddy = mb_find_buddy(e3b, ord, &max);
-+ set_bit(cur, buddy);
-+ set_bit(cur + 1, buddy);
++ mb_set_bit(cur, buddy);
++ mb_set_bit(cur + 1, buddy);
+ e3b->bd_bd->bb_counters[ord]++;
+ e3b->bd_bd->bb_counters[ord]++;
+ }
+ if ((ac->ac_g_flags & 1) && ac->ac_g_group == group) {
+ /* someone asks for space at this specified block
+ * probably he wants to merge it into existing extent */
-+ if (test_bit(ac->ac_g_start, e3b->bd_bitmap)) {
++ if (mb_test_bit(ac->ac_g_start, e3b->bd_bitmap)) {
+ /* good. at least one block is free */
+ max = mb_find_extent(e3b, 0, ac->ac_g_start,
+ ac->ac_g_len, &curex);
+ ext3_mballoc_warning++;
+ }
+ *len = 1;
-+ err = ext3_new_block_old(handle, inode, goal, NULL,NULL, errp);
++ err = ext3_new_block_old(handle, inode, goal, errp);
+ return err;
+ }
+
+ "block = %u", block);
+#if 0
+ for (i = 0; i < ac.ac_b_len; i++)
-+ J_ASSERT(!test_bit(ac.ac_b_start + i, bitmap_bh->b_data));
++ J_ASSERT(!mb_test_bit(ac.ac_b_start + i, bitmap_bh->b_data));
+#endif
+ mb_set_bits(bitmap_bh->b_data, ac.ac_b_start, ac.ac_b_len);
+
+
+ /* loop over the blocks, nad create buddies for free ones */
+ for (i = 0; i < sb->s_blocksize * 8; i++) {
-+ if (!test_bit(i, (void *) bh->b_data)) {
++ if (!mb_test_bit(i, (void *) bh->b_data)) {
+ mb_free_blocks(&e3b, i, 1);
+ count++;
+ }
+
+#define MB_CREDITS \
+ (EXT3_DATA_TRANS_BLOCKS + 3 + EXT3_INDEX_EXTRA_TRANS_BLOCKS + \
-+ 2 * EXT3_QUOTA_INIT_BLOCKS)
++ + 2 * EXT3_SINGLEDATA_TRANS_BLOCKS)
+
+int ext3_mb_init_backend(struct super_block *sb)
+{
+}
+
+int ext3_new_block(handle_t *handle, struct inode *inode,
-+ unsigned long goal, u32 *pc, u32 *pb, int *errp)
++ unsigned long goal, int *errp)
+{
+ int ret, len;
+
+ if (!test_opt(inode->i_sb, MBALLOC)) {
-+ ret = ext3_new_block_old(handle, inode, goal, pc, pb, errp);
++ ret = ext3_new_block_old(handle, inode, goal, errp);
+ goto out;
+ }
+ len = 1;
+ return;
+}
+
-Index: linux-stage/fs/ext3/super.c
+Index: linux-2.6.5-sles9/fs/ext3/super.c
===================================================================
---- linux-stage.orig/fs/ext3/super.c 2004-10-13 17:06:53.000000000 -0400
-+++ linux-stage/fs/ext3/super.c 2004-10-13 17:06:53.000000000 -0400
+--- linux-2.6.5-sles9.orig/fs/ext3/super.c 2004-11-09 02:23:21.597220752 +0300
++++ linux-2.6.5-sles9/fs/ext3/super.c 2004-11-09 02:26:12.572228600 +0300
@@ -389,6 +389,7 @@
struct ext3_super_block *es = sbi->s_es;
int i;
ext3_ext_release(sb);
ext3_xattr_put_super(sb);
journal_destroy(sbi->s_journal);
-@@ -543,7 +544,7 @@
+@@ -542,7 +543,7 @@
Opt_commit, Opt_journal_update, Opt_journal_inum,
Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
Opt_ignore, Opt_barrier, Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
- Opt_err, Opt_extents, Opt_extdebug
-+ Opt_err, Opt_extents, Opt_extdebug, Opt_mballoc
++ Opt_err, Opt_extents, Opt_extdebug, Opt_mballoc,
};
static match_table_t tokens = {
-@@ -588,6 +589,7 @@
+@@ -589,6 +590,7 @@
{Opt_iopen_nopriv, "iopen_nopriv"},
{Opt_extents, "extents"},
{Opt_extdebug, "extdebug"},
{Opt_err, NULL}
};
-@@ -803,6 +805,9 @@
+@@ -810,6 +812,9 @@
case Opt_extdebug:
set_opt (sbi->s_mount_opt, EXTDEBUG);
break;
default:
printk (KERN_ERR
"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1444,7 +1449,8 @@
+@@ -1463,7 +1468,8 @@
ext3_count_dirs(sb));
ext3_ext_init(sb);
return 0;
failed_mount3:
-Index: linux-stage/fs/ext3/Makefile
+Index: linux-2.6.5-sles9/fs/ext3/Makefile
===================================================================
---- linux-stage.orig/fs/ext3/Makefile 2004-10-13 17:06:53.000000000 -0400
-+++ linux-stage/fs/ext3/Makefile 2004-10-13 17:06:53.000000000 -0400
+--- linux-2.6.5-sles9.orig/fs/ext3/Makefile 2004-11-09 02:23:21.593221360 +0300
++++ linux-2.6.5-sles9/fs/ext3/Makefile 2004-11-09 02:26:12.572228600 +0300
@@ -5,7 +5,7 @@
obj-$(CONFIG_EXT3_FS) += ext3.o
ext3-$(CONFIG_EXT3_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o
ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
-Index: linux-stage/fs/ext3/balloc.c
+Index: linux-2.6.5-sles9/fs/ext3/balloc.c
===================================================================
---- linux-stage.orig/fs/ext3/balloc.c 2004-10-13 17:06:52.000000000 -0400
-+++ linux-stage/fs/ext3/balloc.c 2004-10-13 17:06:53.000000000 -0400
+--- linux-2.6.5-sles9.orig/fs/ext3/balloc.c 2004-11-03 08:36:51.000000000 +0300
++++ linux-2.6.5-sles9/fs/ext3/balloc.c 2004-11-09 02:26:53.078070776 +0300
@@ -78,7 +78,7 @@
*
* Return buffer_head on success or NULL in case of failure.
read_block_bitmap(struct super_block *sb, unsigned int block_group)
{
struct ext3_group_desc * desc;
-@@ -98,8 +98,8 @@
+@@ -274,7 +274,7 @@
}
/* Free given blocks, update quota and i_blocks field */
--void ext3_free_blocks (handle_t *handle, struct inode * inode,
-- unsigned long block, unsigned long count)
-+void ext3_free_blocks_old (handle_t *handle, struct inode * inode,
-+ unsigned long block, unsigned long count)
+-void ext3_free_blocks(handle_t *handle, struct inode *inode,
++void ext3_free_blocks_old(handle_t *handle, struct inode *inode,
+ unsigned long block, unsigned long count)
{
struct buffer_head *bitmap_bh = NULL;
- struct buffer_head *gd_bh;
-@@ -528,8 +528,8 @@
+@@ -1142,7 +1142,7 @@
+ * bitmap, and then for any free bit if that fails.
* This function also updates quota and i_blocks field.
*/
- int
--ext3_new_block(handle_t *handle, struct inode *inode, unsigned long goal,
-- u32 *prealloc_count, u32 *prealloc_block, int *errp)
-+ext3_new_block_old(handle_t *handle, struct inode *inode, unsigned long goal,
-+ u32 *prealloc_count, u32 *prealloc_block, int *errp)
+-int ext3_new_block(handle_t *handle, struct inode *inode,
++int ext3_new_block_old(handle_t *handle, struct inode *inode,
+ unsigned long goal, int *errp)
{
- struct buffer_head *bitmap_bh = NULL; /* bh */
- struct buffer_head *gdp_bh; /* bh2 */
-Index: linux-stage/fs/ext3/namei.c
+ struct buffer_head *bitmap_bh = NULL;
+Index: linux-2.6.5-sles9/fs/ext3/namei.c
===================================================================
---- linux-stage.orig/fs/ext3/namei.c 2004-10-13 17:06:52.000000000 -0400
-+++ linux-stage/fs/ext3/namei.c 2004-10-13 17:06:53.000000000 -0400
+--- linux-2.6.5-sles9.orig/fs/ext3/namei.c 2004-11-09 02:18:27.616912552 +0300
++++ linux-2.6.5-sles9/fs/ext3/namei.c 2004-11-09 02:26:12.580227384 +0300
@@ -1640,7 +1640,7 @@
* If the create succeeds, we fill in the inode information
* with d_instantiate().
struct nameidata *nd)
{
handle_t *handle;
-Index: linux-stage/fs/ext3/inode.c
+Index: linux-2.6.5-sles9/fs/ext3/inode.c
===================================================================
---- linux-stage.orig/fs/ext3/inode.c 2004-10-13 17:06:53.000000000 -0400
-+++ linux-stage/fs/ext3/inode.c 2004-10-13 17:06:53.000000000 -0400
-@@ -256,7 +256,7 @@
- ei->i_prealloc_count = 0;
- ei->i_prealloc_block = 0;
- /* Writer: end */
-- ext3_free_blocks (inode, block, total);
-+ ext3_free_blocks (inode, block, total, 1);
- }
- #endif
- }
-@@ -635,7 +635,7 @@
+--- linux-2.6.5-sles9.orig/fs/ext3/inode.c 2004-11-09 02:23:21.592221512 +0300
++++ linux-2.6.5-sles9/fs/ext3/inode.c 2004-11-09 02:26:12.587226320 +0300
+@@ -572,7 +572,7 @@
ext3_journal_forget(handle, branch[i].bh);
}
for (i = 0; i < keys; i++)
return err;
}
-@@ -736,7 +736,7 @@
+@@ -673,7 +673,7 @@
if (err == -EAGAIN)
for (i = 0; i < num; i++)
ext3_free_blocks(handle, inode,
return err;
}
-@@ -1924,7 +1924,7 @@
+@@ -1829,7 +1829,7 @@
}
}
}
/**
-@@ -2095,7 +2095,7 @@
+@@ -2000,7 +2000,7 @@
ext3_journal_test_restart(handle, inode);
}
if (parent_bh) {
/*
-Index: linux-stage/fs/ext3/extents.c
+Index: linux-2.6.5-sles9/fs/ext3/extents.c
===================================================================
---- linux-stage.orig/fs/ext3/extents.c 2004-10-13 17:06:53.000000000 -0400
-+++ linux-stage/fs/ext3/extents.c 2004-10-13 17:06:53.000000000 -0400
+--- linux-2.6.5-sles9.orig/fs/ext3/extents.c 2004-11-09 02:25:56.143726112 +0300
++++ linux-2.6.5-sles9/fs/ext3/extents.c 2004-11-09 02:26:12.591225712 +0300
@@ -740,7 +740,7 @@
for (i = 0; i < depth; i++) {
if (!ablocks[i])
}
}
kfree(ablocks);
-@@ -1388,7 +1388,7 @@
+@@ -1391,7 +1391,7 @@
path->p_idx->ei_leaf);
bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf);
ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf);
return err;
}
-@@ -1876,10 +1876,12 @@
+@@ -1879,10 +1879,12 @@
int needed = ext3_remove_blocks_credits(tree, ex, from, to);
handle_t *handle = ext3_journal_start(tree->inode, needed);
struct buffer_head *bh;
if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) {
/* tail removal */
unsigned long num, start;
-@@ -1891,7 +1893,7 @@
+@@ -1894,7 +1896,7 @@
bh = sb_find_get_block(tree->inode->i_sb, start + i);
ext3_forget(handle, 0, tree->inode, bh, start + i);
}
} else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) {
printk("strange request: removal %lu-%lu from %u:%u\n",
from, to, ex->ee_block, ex->ee_len);
-Index: linux-stage/fs/ext3/xattr.c
+Index: linux-2.6.5-sles9/fs/ext3/xattr.c
===================================================================
---- linux-stage.orig/fs/ext3/xattr.c 2004-10-13 17:06:53.000000000 -0400
-+++ linux-stage/fs/ext3/xattr.c 2004-10-13 17:06:53.000000000 -0400
+--- linux-2.6.5-sles9.orig/fs/ext3/xattr.c 2004-11-09 02:22:55.777146000 +0300
++++ linux-2.6.5-sles9/fs/ext3/xattr.c 2004-11-09 02:26:12.593225408 +0300
@@ -1366,7 +1366,7 @@
new_bh = sb_getblk(sb, block);
if (!new_bh) {
get_bh(bh);
ext3_forget(handle, 1, inode, bh, EXT3_I(inode)->i_file_acl);
} else {
-Index: linux-stage/include/linux/ext3_fs.h
+Index: linux-2.6.5-sles9/include/linux/ext3_fs.h
===================================================================
---- linux-stage.orig/include/linux/ext3_fs.h 2004-10-13 17:06:53.000000000 -0400
-+++ linux-stage/include/linux/ext3_fs.h 2004-10-13 17:06:53.000000000 -0400
+--- linux-2.6.5-sles9.orig/include/linux/ext3_fs.h 2004-11-09 02:25:17.238640584 +0300
++++ linux-2.6.5-sles9/include/linux/ext3_fs.h 2004-11-09 02:26:12.596224952 +0300
@@ -57,6 +57,8 @@
#define ext3_debug(f, a...) do {} while (0)
#endif
/*
* Special inodes numbers
*/
-@@ -336,6 +338,7 @@
+@@ -339,6 +341,7 @@
#define EXT3_MOUNT_IOPEN_NOPRIV 0x80000 /* Make iopen world-readable */
#define EXT3_MOUNT_EXTENTS 0x100000/* Extents support */
#define EXT3_MOUNT_EXTDEBUG 0x200000/* Extents debug */
/* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
#ifndef clear_opt
-@@ -696,7 +699,7 @@
- extern int ext3_new_block (handle_t *, struct inode *, unsigned long,
- __u32 *, __u32 *, int *);
+@@ -698,7 +701,7 @@
+ 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 unsigned long ext3_count_free_blocks (struct super_block *);
extern void ext3_check_blocks_bitmap (struct super_block *);
extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb,
-Index: linux-stage/include/linux/ext3_fs_sb.h
+Index: linux-2.6.5-sles9/include/linux/ext3_fs_sb.h
===================================================================
---- linux-stage.orig/include/linux/ext3_fs_sb.h 2004-10-13 17:06:52.000000000 -0400
-+++ linux-stage/include/linux/ext3_fs_sb.h 2004-10-13 17:06:53.000000000 -0400
-@@ -23,9 +23,29 @@
+--- linux-2.6.5-sles9.orig/include/linux/ext3_fs_sb.h 2004-11-09 02:20:51.598024096 +0300
++++ linux-2.6.5-sles9/include/linux/ext3_fs_sb.h 2004-11-09 02:28:18.753046200 +0300
+@@ -23,10 +23,30 @@
#define EXT_INCLUDE
#include <linux/blockgroup_lock.h>
#include <linux/percpu_counter.h>
+#include <linux/list.h>
#endif
#endif
+ #include <linux/rbtree.h>
+#define EXT3_BB_MAX_BLOCKS 30
+struct ext3_free_metadata {
/*
* third extended-fs super-block data in memory
*/
-@@ -72,6 +92,17 @@
+@@ -78,6 +98,17 @@
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
};
#endif /* _LINUX_EXT3_FS_SB */
-Index: linux-stage/include/linux/ext3_jbd.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_jbd.h 2004-10-13 17:06:52.000000000 -0400
-+++ linux-stage/include/linux/ext3_jbd.h 2004-10-13 19:12:30.000000000 -0400
-@@ -72,6 +72,23 @@
-
- #define EXT3_INDEX_EXTRA_TRANS_BLOCKS 8
-
-+#ifdef CONFIG_QUOTA
-+/* Maximal numbers of writes for quota operation (insert/delete/update)
-+ * (over all formats) - info block, 4 pointer blocks, data block */
-+#define DQUOT_MAX_WRITES 6
-+
-+/* Amount of blocks needed for quota update - we know that the structure was
-+ * allocated so we need to update only inode+data */
-+#define EXT3_QUOTA_TRANS_BLOCKS 2
-+/* Amount of blocks needed for quota insert/delete - we do some block writes
-+ * but inode, sb and group updates are done only once */
-+#define EXT3_QUOTA_INIT_BLOCKS (DQUOT_MAX_WRITES*\
-+ (EXT3_SINGLEDATA_TRANS_BLOCKS-3)+3)
-+#else
-+#define EXT3_QUOTA_TRANS_BLOCKS 0
-+#define EXT3_QUOTA_INIT_BLOCKS 0
-+#endif
-+
- int
- ext3_mark_iloc_dirty(handle_t *handle,
- struct inode *inode,