diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2014-12-03 12:18:29 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-12-10 11:53:48 +0100 |
commit | c0af17d07f1122eff07c751dafef3954bcffc822 (patch) | |
tree | f2094871ed7118fcece521b715745837f3999634 /ctree.c | |
parent | 260675657767bf6cc90cff762efcf9091674ccaf (diff) |
btrfs-progs: Import lookup/del_inode_ref() function.
Import lookup/del_inode_ref() function in inode-item.c, as base functions
for the incoming btrfs_add_link() and btrfs_unlink() functions.
Also modify btrfs_insert_inode_ref() and split_leaf() making them able
to deal with EXTENT_IREF incompat flag.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'ctree.c')
-rw-r--r-- | ctree.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2015,6 +2015,12 @@ static noinline int split_leaf(struct btrfs_trans_handle *trans, int split; int num_doubles = 0; + l = path->nodes[0]; + slot = path->slots[0]; + if (extend && data_size + btrfs_item_size_nr(l, slot) + + sizeof(struct btrfs_item) > BTRFS_LEAF_DATA_SIZE(root)) + return -EOVERFLOW; + /* first try to make some room by pushing left and right */ if (data_size && ins_key->type != BTRFS_DIR_ITEM_KEY) { wret = push_leaf_right(trans, root, path, data_size, 0); |