merge leaves before split
authorChris Mason <chris.mason@oracle.com>
Tue, 13 Mar 2007 15:17:52 +0000 (11:17 -0400)
committerDavid Woodhouse <dwmw2@hera.kernel.org>
Tue, 13 Mar 2007 15:17:52 +0000 (11:17 -0400)
TODO
ctree.c

diff --git a/TODO b/TODO
index 52d2a7a071f468c815386518e2d6f9fcf2d12529..ad29267b8738352459e48890a711cbee482dc715 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,10 +1,8 @@
 * cleanup, add more error checking, get rid of BUG_ONs
-* endian fixes
 * Make IO functions look more like the page cache
 * Fix ENOSPC handling
 * make blocksize a mkfs parameter instead of #define
 * make a real mkfs and superblock
-* Add shadowing and transactions
 * Do checksumming
 * Define FS objects in terms of different item types
 * Add block mapping tree (simple dm layer)
diff --git a/ctree.c b/ctree.c
index bbb632291709c9b1d3335156e66a232a33a68d3c..dc620186e501cdaa206f6e6dc27d15131fd5bf8e 100644 (file)
--- a/ctree.c
+++ b/ctree.c
@@ -1043,6 +1043,15 @@ static int split_leaf(struct btrfs_root *root, struct btrfs_path *path,
        int ret;
        int wret;
 
+       wret = push_leaf_left(root, path, data_size);
+       if (wret < 0)
+               return wret;
+       if (wret) {
+               wret = push_leaf_right(root, path, data_size);
+               if (wret < 0)
+                       return wret;
+       }
+
        l_buf = path->nodes[0];
        l = &l_buf->leaf;