Lines Matching refs:item
338 * If the key is already in the destination tree the existing item is
339 * overwritten. If the existing item isn't big enough, it is extended.
342 * If the key isn't in the destination yet, a new item is inserted.
416 struct btrfs_inode_item *item;
420 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
422 nbytes = btrfs_inode_nbytes(path->nodes[0], item);
423 item = btrfs_item_ptr(eb, slot,
425 btrfs_set_inode_nbytes(eb, item, nbytes);
432 mode = btrfs_inode_mode(eb, item);
434 btrfs_set_inode_size(eb, item, 0);
437 struct btrfs_inode_item *item;
444 item = btrfs_item_ptr(eb, slot, struct btrfs_inode_item);
445 btrfs_set_inode_nbytes(eb, item, 0);
452 mode = btrfs_inode_mode(eb, item);
454 btrfs_set_inode_size(eb, item, 0);
464 /* make sure any existing item is the correct size */
584 struct btrfs_file_extent_item *item;
589 item = btrfs_item_ptr(eb, slot, struct btrfs_file_extent_item);
590 found_type = btrfs_file_extent_type(eb, item);
594 nbytes = btrfs_file_extent_num_bytes(eb, item);
601 if (btrfs_file_extent_disk_bytenr(eb, item) == 0)
604 size = btrfs_file_extent_ram_bytes(eb, item);
605 nbytes = btrfs_file_extent_ram_bytes(eb, item);
639 read_extent_buffer(eb, &cmp1, (unsigned long)item,
666 if (btrfs_file_extent_disk_bytenr(eb, item) == 0 &&
671 sizeof(*item));
677 (unsigned long)item, sizeof(*item));
679 ins.objectid = btrfs_file_extent_disk_bytenr(eb, item);
680 ins.offset = btrfs_file_extent_disk_num_bytes(eb, item);
682 offset = key->offset - btrfs_file_extent_offset(eb, item);
686 * file extent item copy and skip normal backref update,
693 btrfs_file_extent_disk_bytenr(eb, item),
694 btrfs_file_extent_disk_num_bytes(eb, item),
736 if (btrfs_file_extent_compression(eb, item)) {
741 btrfs_file_extent_offset(eb, item);
743 btrfs_file_extent_num_bytes(eb, item);
755 * extent item and partially referenced by another
756 * file extent item (like after using the clone or
774 * has a single csum item that covers the entire range
779 * After the first file extent item is replayed, the
780 * csum tree gets the following csum item:
786 * extent item, if we do not delete existing csum items
796 * end up looking at the second csum item only, which
848 * item
946 * inode backreferences may have multiple refs in a single item,
1221 * Take an inode reference item from the log tree and iterate all names from the
1222 * inode reference item in the subvolume tree with the same key (if it exists).
1223 * For any name that is not in the inode reference item from the log tree, do a
1225 * reference item and both dir index keys).
1419 * replay one inode back reference item found in the log tree.
1485 * item to another.
1530 * If a reference item already exists for this inode
1533 * from the parent before adding the new reference item
1584 * Before we overwrite the inode reference item in the subvolume tree
1585 * with the item from the log tree, we must unlink all names from the
1587 * item, otherwise we end up with an inconsistent subvolume tree where
1589 * item with the same name.
1908 * take a single entry in a log directory item and replay it into
1911 * if a conflicting item exists in the subdirectory already,
1995 /* the existing item matches the logged item */
2073 * find all the names in a directory item and reconcile them into
2075 * one name in a directory item, but the same code gets used for
2160 * directory is in a logged range item, but not actually in the log
2171 struct btrfs_dir_log_item *item;
2197 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
2199 found_end = btrfs_dir_log_end(path->nodes[0], item);
2209 /* check the next slot in the tree to see if it is a valid item */
2224 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
2226 found_end = btrfs_dir_log_end(path->nodes[0], item);
2236 * this looks for a given directory item in the log. If the directory
2237 * item is not in the log, the item is removed and the inode it points
2474 * because we replay the deletes before we copy in the inode item
2556 * The second stage copies all the other item types from the log into
2955 * helper function to update the item for a given subvolumes log root
2966 /* insert root item on the first sync */
3475 struct btrfs_inode_item *item;
3478 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
3480 i_size = btrfs_inode_size(path->nodes[0], item);
3485 btrfs_set_inode_size(path->nodes[0], item, i_size);
3541 * creates a range item in the log for 'dirid'. first_offset and
3553 struct btrfs_dir_log_item *item;
3561 ret = btrfs_insert_empty_item(trans, log, path, &key, sizeof(*item));
3565 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
3567 btrfs_set_dir_log_end(path->nodes[0], item, last_offset);
3667 * we have a block from this transaction, log every item in it
3729 * look ahead to the next item and see if it is also
3819 * inode. max_key_type indicates the highest item type to remove.
3877 struct btrfs_inode_item *item,
3891 btrfs_set_token_inode_generation(&token, item, 0);
3892 btrfs_set_token_inode_size(&token, item, logged_isize);
3894 btrfs_set_token_inode_generation(&token, item,
3896 btrfs_set_token_inode_size(&token, item, inode->i_size);
3899 btrfs_set_token_inode_uid(&token, item, i_uid_read(inode));
3900 btrfs_set_token_inode_gid(&token, item, i_gid_read(inode));
3901 btrfs_set_token_inode_mode(&token, item, inode->i_mode);
3902 btrfs_set_token_inode_nlink(&token, item, inode->i_nlink);
3904 btrfs_set_token_timespec_sec(&token, &item->atime,
3906 btrfs_set_token_timespec_nsec(&token, &item->atime,
3909 btrfs_set_token_timespec_sec(&token, &item->mtime,
3911 btrfs_set_token_timespec_nsec(&token, &item->mtime,
3914 btrfs_set_token_timespec_sec(&token, &item->ctime,
3916 btrfs_set_token_timespec_nsec(&token, &item->ctime,
3919 btrfs_set_token_inode_nbytes(&token, item, inode_get_bytes(inode));
3921 btrfs_set_token_inode_sequence(&token, item, inode_peek_iversion(inode));
3922 btrfs_set_token_inode_transid(&token, item, trans->transid);
3923 btrfs_set_token_inode_rdev(&token, item, inode->i_rdev);
3924 btrfs_set_token_inode_flags(&token, item, BTRFS_I(inode)->flags);
3925 btrfs_set_token_inode_block_group(&token, item, 0);
3975 * Due to extent cloning, we might have logged a csum item that covers a
3977 * item for a larger subrange of the same extent or the entire range.
4578 struct btrfs_inode_item *item;
4580 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
4582 *size_ret = btrfs_inode_size(path->nodes[0], item);
4683 * that contains the inode item and references) we may end up not processing
4749 * an extent item and we are holding the inode lock, the
5314 * it to the log tree. For a non full sync, we always log the inode item
5364 * Make sure the new inode item we write to the log has
5635 * from the inode, leaving the logged inode item with a link count that does
5638 * link count in the inode item (see replay_one_buffer() and
5643 * BTRFS_DIR_INDEX_KEY are added to fs/subvol tree and the logged inode item
5651 * The directory's inode item with a wrong i_size is not a problem as well,
5653 * item of the fs/subvol tree (see overwrite_item()).
6064 * track of which subitem we are processing for each item in
6213 * but the file inode does not have a matching BTRFS_INODE_REF_KEY item