Lines Matching defs:leaf
48 struct extent_buffer *leaf;
60 leaf = path->nodes[0];
62 ptr = btrfs_item_ptr(leaf, path->slots[0], char);
63 BUG_ON(data_size > btrfs_item_size(leaf, item));
64 ptr += btrfs_item_size(leaf, item) - data_size;
83 struct extent_buffer *leaf;
99 leaf = path->nodes[0];
101 btrfs_set_dir_item_key(leaf, dir_item, &disk_key);
102 btrfs_set_dir_type(leaf, dir_item, BTRFS_FT_XATTR);
103 btrfs_set_dir_name_len(leaf, dir_item, name_len);
104 btrfs_set_dir_transid(leaf, dir_item, trans->transid);
105 btrfs_set_dir_data_len(leaf, dir_item, data_len);
109 write_extent_buffer(leaf, name, name_ptr, name_len);
110 write_extent_buffer(leaf, data, data_ptr, data_len);
133 struct extent_buffer *leaf;
160 leaf = path->nodes[0];
161 btrfs_set_dir_item_key(leaf, dir_item, &disk_key);
162 btrfs_set_dir_type(leaf, dir_item, type);
163 btrfs_set_dir_data_len(leaf, dir_item, 0);
164 btrfs_set_dir_name_len(leaf, dir_item, name_len);
165 btrfs_set_dir_transid(leaf, dir_item, trans->transid);
168 write_extent_buffer(leaf, name, name_ptr, name_len);
169 btrfs_mark_buffer_dirty(leaf);
227 struct extent_buffer *leaf;
265 leaf = path->nodes[0];
267 if (data_size + btrfs_item_size_nr(leaf, slot) +
316 struct extent_buffer *leaf;
330 leaf = path->nodes[0];
331 nritems = btrfs_header_nritems(leaf);
340 leaf = path->nodes[0];
341 nritems = btrfs_header_nritems(leaf);
345 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
395 struct extent_buffer *leaf;
397 leaf = path->nodes[0];
398 dir_item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_dir_item);
399 if (verify_dir_item(root, leaf, dir_item))
402 total_len = btrfs_item_size_nr(leaf, path->slots[0]);
405 btrfs_dir_name_len(leaf, dir_item) +
406 btrfs_dir_data_len(leaf, dir_item);
409 if (btrfs_dir_name_len(leaf, dir_item) == name_len &&
410 memcmp_extent_buffer(leaf, name, name_ptr, name_len) == 0)
430 struct extent_buffer *leaf;
435 leaf = path->nodes[0];
436 sub_item_len = sizeof(*di) + btrfs_dir_name_len(leaf, di) +
437 btrfs_dir_data_len(leaf, di);
438 item_len = btrfs_item_size_nr(leaf, path->slots[0]);
446 start = btrfs_item_ptr_offset(leaf, path->slots[0]);
447 memmove_extent_buffer(leaf, ptr, ptr + sub_item_len,
455 struct extent_buffer *leaf,
459 u8 type = btrfs_dir_type(leaf, dir_item);
470 if (btrfs_dir_name_len(leaf, dir_item) > namelen) {
472 (unsigned)btrfs_dir_data_len(leaf, dir_item));
477 if ((btrfs_dir_data_len(leaf, dir_item) +
478 btrfs_dir_name_len(leaf, dir_item)) > BTRFS_MAX_XATTR_SIZE(root)) {
480 (unsigned)btrfs_dir_name_len(leaf, dir_item),
481 (unsigned)btrfs_dir_data_len(leaf, dir_item));