Lines Matching defs:item

22 #include "file-item.h"
78 * @len: logical length of the file extent item
84 * The start and len must match the file extent item, so thus must be sectorsize
106 * @len: logical length of the file extent item
112 * The start and len must match the file extent item, so thus must be sectorsize
166 struct btrfs_file_extent_item *item;
179 sizeof(*item));
184 item = btrfs_item_ptr(leaf, path->slots[0],
186 btrfs_set_file_extent_disk_bytenr(leaf, item, 0);
187 btrfs_set_file_extent_disk_num_bytes(leaf, item, 0);
188 btrfs_set_file_extent_offset(leaf, item, 0);
189 btrfs_set_file_extent_num_bytes(leaf, item, num_bytes);
190 btrfs_set_file_extent_ram_bytes(leaf, item, num_bytes);
191 btrfs_set_file_extent_generation(leaf, item, trans->transid);
192 btrfs_set_file_extent_type(leaf, item, BTRFS_FILE_EXTENT_REG);
193 btrfs_set_file_extent_compression(leaf, item, 0);
194 btrfs_set_file_extent_encryption(leaf, item, 0);
195 btrfs_set_file_extent_other_encoding(leaf, item, 0);
213 struct btrfs_csum_item *item;
247 item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_csum_item);
248 item = (struct btrfs_csum_item *)((unsigned char *)item +
250 return item;
287 struct btrfs_csum_item *item = NULL;
299 /* Check if the current csum item covers disk_bytenr */
301 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
313 /* Current item doesn't contain the desired range, search again */
316 item = btrfs_lookup_csum(NULL, csum_root, path, disk_bytenr, 0);
317 if (IS_ERR(item)) {
318 ret = PTR_ERR(item);
331 read_extent_buffer(path->nodes[0], dst, (unsigned long)item,
466 struct btrfs_csum_item *item;
497 * item:
500 * |<- csum item ->|
504 * |<- csum item ->|
506 * Check if the previous csum item covers the leading part of
508 * item.
548 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
570 ((unsigned long)item) + offset,
607 struct btrfs_csum_item *item;
646 * item:
649 * |<- csum item ->|
653 * |<- csum item ->|
655 * Check if the previous csum item covers the leading part of
657 * item.
698 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
711 ((unsigned long)item) + offset,
836 * A simple truncate off the end of the item
918 /* delete the entire item, it is inside our range */
960 * we need to split this item and insert a new one.
965 * The trick here is the max size of a csum item leaves
967 * item header. So, we split the item in place,
970 * a nicely formed csum item that we can neatly
987 * item changed size or key
1047 struct btrfs_csum_item *item;
1071 item = btrfs_lookup_csum(trans, root, path, bytenr, 1);
1072 if (!IS_ERR(item)) {
1081 ret = PTR_ERR(item);
1096 /* We didn't find a csum item, insert one. */
1105 * At this point, we know the tree has a checksum item that ends at an
1107 * We try to extend that item as much as possible and then add as many
1111 * checksum. If it has go directly to the item extension code, otherwise
1168 * So if we try to extend the previous checksum item, which has
1171 * checksum item. If we are at the last item in the leaf, then
1173 * item - it is not worth the complexity of releasing the path,
1236 item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_csum_item);
1237 item_end = (struct btrfs_csum_item *)((unsigned char *)item +
1239 item = (struct btrfs_csum_item *)((unsigned char *)item +
1244 ins_size = min_t(u32, (unsigned long)item_end - (unsigned long)item,
1246 write_extent_buffer(leaf, sums->sums + index, (unsigned long)item,
1323 "unknown file extent item type %d, inode %llu, offset %llu, "
1330 * Returns the end offset (non inclusive) of the file extent item the given path