OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff190c0
)
Btrfs: Fix split_leaf to avoid incorrect double splits
author
Chris Mason
<chris.mason@oracle.com>
Fri, 19 Oct 2007 18:01:21 +0000
(14:01 -0400)
committer
Chris Mason
<chris.mason@oracle.com>
Thu, 25 Sep 2008 15:03:57 +0000
(11:03 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/ctree.c
b/fs/btrfs/ctree.c
index
e846694
..
53e40b5
100644
(file)
--- a/
fs/btrfs/ctree.c
+++ b/
fs/btrfs/ctree.c
@@
-1865,7
+1865,11
@@
static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root
return ret;
}
mid = slot;
- double_split = 1;
+ if (mid != nritems &&
+ leaf_space_used(l, mid, nritems - mid) +
+ space_needed > BTRFS_LEAF_DATA_SIZE(root)) {
+ double_split = 1;
+ }
}
}
nritems = nritems - mid;