diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-13 11:17:52 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-13 11:17:52 -0400 |
commit | eaee50e881b88766d9a781c54c4142456cf5e527 (patch) | |
tree | 77d26155f563d20d431592236493bde4ae9d9b08 | |
parent | 9aca1d51323c0291a7358e0728b64ec4f17d1a77 (diff) |
Btrfs: merge leaves before split
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/TODO | 2 | ||||
-rw-r--r-- | fs/btrfs/ctree.c | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/fs/btrfs/TODO b/fs/btrfs/TODO index 52d2a7a071f4..ad29267b8738 100644 --- a/fs/btrfs/TODO +++ b/fs/btrfs/TODO | |||
@@ -1,10 +1,8 @@ | |||
1 | * cleanup, add more error checking, get rid of BUG_ONs | 1 | * cleanup, add more error checking, get rid of BUG_ONs |
2 | * endian fixes | ||
3 | * Make IO functions look more like the page cache | 2 | * Make IO functions look more like the page cache |
4 | * Fix ENOSPC handling | 3 | * Fix ENOSPC handling |
5 | * make blocksize a mkfs parameter instead of #define | 4 | * make blocksize a mkfs parameter instead of #define |
6 | * make a real mkfs and superblock | 5 | * make a real mkfs and superblock |
7 | * Add shadowing and transactions | ||
8 | * Do checksumming | 6 | * Do checksumming |
9 | * Define FS objects in terms of different item types | 7 | * Define FS objects in terms of different item types |
10 | * Add block mapping tree (simple dm layer) | 8 | * Add block mapping tree (simple dm layer) |
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index bbb632291709..dc620186e501 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -1043,6 +1043,15 @@ static int split_leaf(struct btrfs_root *root, struct btrfs_path *path, | |||
1043 | int ret; | 1043 | int ret; |
1044 | int wret; | 1044 | int wret; |
1045 | 1045 | ||
1046 | wret = push_leaf_left(root, path, data_size); | ||
1047 | if (wret < 0) | ||
1048 | return wret; | ||
1049 | if (wret) { | ||
1050 | wret = push_leaf_right(root, path, data_size); | ||
1051 | if (wret < 0) | ||
1052 | return wret; | ||
1053 | } | ||
1054 | |||
1046 | l_buf = path->nodes[0]; | 1055 | l_buf = path->nodes[0]; |
1047 | l = &l_buf->leaf; | 1056 | l = &l_buf->leaf; |
1048 | 1057 | ||