Index: iam/fs/ext3/Makefile
===================================================================
--- iam.orig/fs/ext3/Makefile 2006-05-31 20:24:32.000000000 +0400
-+++ iam/fs/ext3/Makefile 2006-08-23 20:28:37.000000000 +0400
++++ iam/fs/ext3/Makefile 2006-08-24 01:37:35.000000000 +0400
@@ -6,7 +6,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o
ext3-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
Index: iam/fs/ext3/namei.c
===================================================================
--- iam.orig/fs/ext3/namei.c 2006-05-31 20:24:32.000000000 +0400
-+++ iam/fs/ext3/namei.c 2006-06-27 21:10:17.000000000 +0400
++++ iam/fs/ext3/namei.c 2006-08-24 01:37:34.000000000 +0400
@@ -24,81 +24,6 @@
* Theodore Ts'o, 2002
*/
-}
-
-static void iam_path_compat_fini(struct iam_path_compat *path)
--{
++int dx_lookup(struct iam_path *path)
+ {
- iam_path_fini(&path->ipc_path);
- iam_container_fini(&path->ipc_container);
-}
- .hinfo = &hinfo
- };
- int err, i;
--
++ u32 ptr;
++ int err = 0;
++ int i;
+
- iam_path_init(path, c, &hc);
- for (i = 0; i < ARRAY_SIZE(path->ip_key_scratch); ++i)
- path->ip_key_scratch[i] =
- err = dx_lookup(path);
- if (err)
- goto errout;
-+int dx_lookup(struct iam_path *path)
-+{
-+ u32 ptr;
-+ int err = 0;
-+ int i;
-+
+ struct iam_descr *param;
+ struct iam_frame *frame;
+ struct iam_container *c;
+ /*
+ * Algorithm below depends on this.
+ */
-+ assert(descr->id_node_gap < descr->id_root_gap);
++ assert(dx_root_limit(path) < dx_node_limit(path));
+
frame = path->ip_frame;
entries = frame->entries;
dxtrace(printk("Split index %i/%i\n", count1, count2));
-@@ -2537,16 +1587,30 @@ static int split_index_node(handle_t *ha
+@@ -2537,16 +1587,36 @@ static int split_index_node(handle_t *ha
swap(frame->bh, bh2);
bh_new[i] = bh2;
}
+ err = ext3_journal_dirty_metadata(handle, bh);
+ if (err)
+ goto journal_error;
++ /*
++ * This function was called to make insertion of new leaf
++ * possible. Check that it fulfilled its obligations.
++ */
++ assert(dx_get_count(path->ip_frame->entries) <
++ dx_get_limit(path->ip_frame->entries));
+ }
+ if (nr_splet > 0) {
+ /*
}
goto cleanup;
journal_error:
-@@ -2578,7 +1642,7 @@ static int ext3_dx_add_entry(handle_t *h
+@@ -2578,7 +1648,7 @@ static int ext3_dx_add_entry(handle_t *h
size_t isize;
iam_path_compat_init(&cpath, dir);
err = dx_probe(dentry, NULL, &hinfo, path);
if (err != 0)
-@@ -2588,8 +1652,9 @@ static int ext3_dx_add_entry(handle_t *h
+@@ -2588,8 +1658,9 @@ static int ext3_dx_add_entry(handle_t *h
/* XXX nikita: global serialization! */
isize = dir->i_size;
if (err != 0)
goto cleanup;
-@@ -2609,7 +1674,7 @@ static int ext3_dx_add_entry(handle_t *h
+@@ -2609,7 +1680,7 @@ static int ext3_dx_add_entry(handle_t *h
goto cleanup;
/*copy split inode too*/
if (!de)
goto cleanup;
-@@ -2724,12 +1789,12 @@ static struct inode * ext3_new_inode_wan
+@@ -2724,12 +1795,12 @@ static struct inode * ext3_new_inode_wan
* is so far negative - it has no inode.
*
* If the create succeeds, we fill in the inode information
Index: iam/include/linux/lustre_iam.h
===================================================================
--- iam.orig/include/linux/lustre_iam.h 2006-05-31 20:24:32.000000000 +0400
-+++ iam/include/linux/lustre_iam.h 2006-08-23 20:28:37.000000000 +0400
++++ iam/include/linux/lustre_iam.h 2006-08-24 01:37:35.000000000 +0400
@@ -1,9 +1,68 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8: