Lines Matching defs:leaf
393 * we'll have to clone the leaf in the path, release the path and use
394 * the leaf before writing into the log tree. See the comments at
685 struct extent_buffer *leaf;
687 leaf = path->nodes[0];
688 existing = btrfs_item_ptr(leaf, path->slots[0],
693 read_extent_buffer(leaf, &cmp2, (unsigned long)existing,
934 struct extent_buffer *leaf;
938 leaf = path->nodes[0];
940 btrfs_dir_item_key_to_cpu(leaf, di, &location);
941 ret = read_alloc_one_name(leaf, di + 1, btrfs_dir_name_len(leaf, di), &name);
1060 struct extent_buffer *leaf;
1076 leaf = path->nodes[0];
1088 ptr = btrfs_item_ptr_offset(leaf, path->slots[0]);
1089 ptr_end = ptr + btrfs_item_size(leaf, path->slots[0]);
1094 ret = read_alloc_one_name(leaf, (victim_ref + 1),
1095 btrfs_inode_ref_name_len(leaf, victim_ref),
1135 leaf = path->nodes[0];
1137 item_size = btrfs_item_size(leaf, path->slots[0]);
1138 base = btrfs_item_ptr_offset(leaf, path->slots[0]);
1145 if (btrfs_inode_extref_parent(leaf, extref) != parent_objectid)
1148 ret = read_alloc_one_name(leaf, &extref->name,
1149 btrfs_inode_extref_name_len(leaf, extref),
1498 struct extent_buffer *leaf;
1506 leaf = path->nodes[0];
1507 item_size = btrfs_item_size(leaf, path->slots[0]);
1508 ptr = btrfs_item_ptr_offset(leaf, path->slots[0]);
1513 name_len = btrfs_inode_extref_name_len(leaf, extref);
3513 * from one leaf to another in order to accommodate for the new items.
3597 * organized such that it's placed at the end of a leaf and from right
3647 * We need to clone the leaf, release the read lock on it, and use the
3814 * be logged might be in a previous leaf, and there might be a
3888 * The next leaf was not changed in the current transaction
3912 * In case the leaf was changed in the current transaction but
3914 * in the leaf is a dir item and there's no gap between that last
3915 * dir item and the first one on the next leaf (which did not
3934 * key from a leaf changed in the current transaction, and to allow us to always
4111 struct extent_buffer *leaf,
4119 btrfs_init_map_token(&token, leaf);
4185 * attempt a write lock on the leaf's parent, which adds unnecessary lock
4188 * already exists can also result in unnecessarily splitting a leaf.
4286 * To keep lockdep happy and avoid deadlocks, clone the source leaf and
4289 * while holding a read lock on a leaf from the subvolume tree, which
4309 * node mutex while having a read lock on a leaf from the subvolume,
4311 * write lock the same subvolume leaf for flushing delayed items.
4431 * We have a leaf full of old extent items that don't need to be logged,
4450 * We're done, all the remaining items in the source leaf
4631 struct extent_buffer *leaf;
4692 leaf = path->nodes[0];
4693 write_extent_buffer(leaf, &fi,
4694 btrfs_item_ptr_offset(leaf, path->slots[0]),
4696 btrfs_mark_buffer_dirty(trans, leaf);
4722 struct extent_buffer *leaf;
4753 leaf = path->nodes[0];
4755 ei = btrfs_item_ptr(leaf, slot, struct btrfs_file_extent_item);
4757 if (btrfs_file_extent_type(leaf, ei) ==
4761 btrfs_item_key_to_cpu(leaf, &key, slot);
4763 btrfs_file_extent_num_bytes(leaf, ei);
4773 leaf = path->nodes[0];
4776 if (slot >= btrfs_header_nritems(leaf)) {
4794 btrfs_item_key_to_cpu(leaf, &key, slot);
5012 struct extent_buffer *leaf = path->nodes[0];
5013 int nritems = btrfs_header_nritems(leaf);
5031 btrfs_item_key_to_cpu(leaf, &key, slot);
5057 * deletion of entire leafs or all the extent items of the first leaf (the one
5088 struct extent_buffer *leaf = path->nodes[0];
5098 leaf = path->nodes[0];
5101 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
5133 leaf = path->nodes[0];
5412 struct extent_buffer *leaf = path->nodes[0];
5427 di = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_dir_item);
5428 type = btrfs_dir_ftype(leaf, di);
5429 if (btrfs_dir_transid(leaf, di) < trans->transid)
5431 btrfs_dir_item_key_to_cpu(leaf, di, &di_key);
5940 * lock the same leaf with btrfs_log_prealloc_extents() below.
6125 struct extent_buffer *leaf = path->nodes[0];
6126 const int last_slot = btrfs_header_nritems(leaf) - 1;
6136 btrfs_item_key_to_cpu(leaf, &key, slot);
6191 * If we deleted items from the leaf, it means we have a range
6204 * leaf space usage, by avoiding adding a new range item.
6687 struct extent_buffer *leaf = path->nodes[0];
6693 if (slot >= btrfs_header_nritems(leaf)) {
6702 btrfs_item_key_to_cpu(leaf, &key, slot);
6707 item_size = btrfs_item_size(leaf, slot);
6708 ptr = btrfs_item_ptr_offset(leaf, slot);
6722 leaf, extref);
6724 cur_offset += btrfs_inode_extref_name_len(leaf,
6795 struct extent_buffer *leaf;
6829 leaf = path->nodes[0];
6831 if (slot >= btrfs_header_nritems(leaf)) {
6837 leaf = path->nodes[0];
6841 btrfs_item_key_to_cpu(leaf, &found_key, slot);
6920 struct extent_buffer *leaf = path->nodes[0];
6924 if (slot >= btrfs_header_nritems(leaf)) {
6933 btrfs_item_key_to_cpu(leaf, &found_key, slot);