Lines Matching refs:leaf
502 struct extent_buffer *leaf; in btrfs_search_slot_for_read() local
514 leaf = p->nodes[0]; in btrfs_search_slot_for_read()
517 if (p->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_search_slot_for_read()
537 leaf = p->nodes[0]; in btrfs_search_slot_for_read()
538 if (p->slots[0] == btrfs_header_nritems(leaf)) in btrfs_search_slot_for_read()
583 int btrfs_leaf_free_space(struct extent_buffer *leaf) in btrfs_leaf_free_space() argument
585 int nritems = btrfs_header_nritems(leaf); in btrfs_leaf_free_space()
589 BUG_ON(leaf->fs_info && leaf->fs_info->nodesize != leaf->len); in btrfs_leaf_free_space()
590 leaf_data_size = __BTRFS_LEAF_DATA_SIZE(leaf->len); in btrfs_leaf_free_space()
591 ret = leaf_data_size - leaf_space_used(leaf, 0 ,nritems); in btrfs_leaf_free_space()
594 ret, leaf_data_size, leaf_space_used(leaf, 0, nritems), in btrfs_leaf_free_space()
713 struct extent_buffer *leaf; in btrfs_previous_item() local
725 leaf = path->nodes[0]; in btrfs_previous_item()
726 nritems = btrfs_header_nritems(leaf); in btrfs_previous_item()
732 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); in btrfs_previous_item()