• Home
  • Raw
  • Download

Lines Matching refs:key

383 	struct btrfs_key key;  in btrfs_drop_extents()  local
428 btrfs_item_key_to_cpu(leaf, &key, slot); in btrfs_drop_extents()
429 if (btrfs_key_type(&key) == BTRFS_EXTENT_DATA_KEY && in btrfs_drop_extents()
430 key.offset >= end) { in btrfs_drop_extents()
433 if (btrfs_key_type(&key) > BTRFS_EXTENT_DATA_KEY || in btrfs_drop_extents()
434 key.objectid != inode->i_ino) { in btrfs_drop_extents()
438 search_start = max(key.offset, start); in btrfs_drop_extents()
441 if (btrfs_key_type(&key) == BTRFS_EXTENT_DATA_KEY) { in btrfs_drop_extents()
459 extent_end = key.offset + in btrfs_drop_extents()
466 extent_end = key.offset + in btrfs_drop_extents()
490 if (end <= extent_end && start >= key.offset && found_inline) in btrfs_drop_extents()
501 if (end < extent_end && end >= key.offset) { in btrfs_drop_extents()
503 if (found_inline && start <= key.offset) in btrfs_drop_extents()
541 if (start > key.offset) { in btrfs_drop_extents()
547 new_num = start - key.offset; in btrfs_drop_extents()
561 } else if (key.offset < inline_limit && in btrfs_drop_extents()
566 inline_limit - key.offset); in btrfs_drop_extents()
581 key.offset); in btrfs_drop_extents()
589 if (bookend && found_inline && start <= key.offset) { in btrfs_drop_extents()
593 inode_sub_bytes(inode, end - key.offset); in btrfs_drop_extents()
626 le64_to_cpu(old.offset) + end - key.offset); in btrfs_drop_extents()
668 root_gen, key.objectid, 0); in btrfs_drop_extents()
693 struct btrfs_key key; in extent_mergeable() local
699 btrfs_item_key_to_cpu(leaf, &key, slot); in extent_mergeable()
700 if (key.objectid != objectid || key.type != BTRFS_EXTENT_DATA_KEY) in extent_mergeable()
711 extent_end = key.offset + btrfs_file_extent_num_bytes(leaf, fi); in extent_mergeable()
712 if ((*start && *start != key.offset) || (*end && *end != extent_end)) in extent_mergeable()
715 *start = key.offset; in extent_mergeable()
734 struct btrfs_key key; in btrfs_mark_extent_written() local
753 key.objectid = inode->i_ino; in btrfs_mark_extent_written()
754 key.type = BTRFS_EXTENT_DATA_KEY; in btrfs_mark_extent_written()
756 key.offset = split; in btrfs_mark_extent_written()
758 key.offset = split - 1; in btrfs_mark_extent_written()
760 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_mark_extent_written()
765 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_mark_extent_written()
766 BUG_ON(key.objectid != inode->i_ino || in btrfs_mark_extent_written()
767 key.type != BTRFS_EXTENT_DATA_KEY); in btrfs_mark_extent_written()
772 extent_end = key.offset + btrfs_file_extent_num_bytes(leaf, fi); in btrfs_mark_extent_written()
773 BUG_ON(key.offset > start || extent_end < end); in btrfs_mark_extent_written()
779 if (key.offset == start) in btrfs_mark_extent_written()
782 if (key.offset == start && extent_end == end) { in btrfs_mark_extent_written()
803 key.offset = other_start; in btrfs_mark_extent_written()
822 extent_end - key.offset); in btrfs_mark_extent_written()
841 btrfs_set_file_extent_num_bytes(leaf, fi, split - key.offset); in btrfs_mark_extent_written()
842 extent_offset += split - key.offset; in btrfs_mark_extent_written()
844 BUG_ON(key.offset != start); in btrfs_mark_extent_written()
846 split - key.offset); in btrfs_mark_extent_written()
848 key.offset = split; in btrfs_mark_extent_written()
849 btrfs_set_item_key_safe(trans, root, path, &key); in btrfs_mark_extent_written()
865 key.offset = split; in btrfs_mark_extent_written()
866 btrfs_set_item_key_safe(trans, root, path, &key); in btrfs_mark_extent_written()
896 key.offset = start; in btrfs_mark_extent_written()
897 ret = btrfs_insert_empty_item(trans, root, path, &key, sizeof(*fi)); in btrfs_mark_extent_written()
908 btrfs_set_file_extent_num_bytes(leaf, fi, extent_end - key.offset); in btrfs_mark_extent_written()