Lines Matching +full:compare +full:- +full:and +full:- +full:swap

1 /* SPDX-License-Identifier: GPL-2.0 */
42 * will still trigger readahead for other nodes and leaves that follow
53 * level 0 is always the leaf, and nodes[1...BTRFS_MAX_LEVEL] will point
70 * and to force calls to keep space in the nodes
80 * existing item and ins_len contains only the data size and not item
93 * btrfs_record_root_in_trans is a multi-step process, and it can race
94 * with the balancing code. But the race is very small, and only the
102 * Only subvolume trees and their reloc trees have this bit set.
107 * - How balance works
108 * For shareable roots, we need to use reloc tree and do path
109 * replacement for balance, and need various pre/post hooks for
112 * While for non-shareable trees, we just simply do a tree search
115 * - How dirty roots are tracked
117 * track them, while non-subvolume roots have TRACK_DIRTY bit, they
138 /* The root has a log tree. Used for subvolume roots and the tree root. */
163 * and for the extent tree extent_root root.
207 * btrfs_get_root_last_log_commit() and btrfs_set_root_last_log_commit()
220 /* The dirty list is only used by non-shareable roots */
226 /* red-black tree that keeps track of in-memory inodes */
263 * these can span multiple transactions and basically include
271 * Not empty if this subvolume root has gone through tree block swap
280 * manipulation with the read-only status via SUBVOL_SETFLAGS
289 /* For exclusion of snapshot creation and nocow writes */
323 /* Byte-swap the constant at compile time, root_item::flags is LE */ in btrfs_root_readonly()
324 return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_RDONLY)) != 0; in btrfs_root_readonly()
329 /* Byte-swap the constant at compile time, root_item::flags is LE */ in btrfs_root_dead()
330 return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_DEAD)) != 0; in btrfs_root_dead()
335 return root->root_key.objectid; in btrfs_root_id()
340 return READ_ONCE(root->log_transid); in btrfs_get_root_log_transid()
345 WRITE_ONCE(root->log_transid, log_transid); in btrfs_set_root_log_transid()
350 return READ_ONCE(root->last_log_commit); in btrfs_get_root_last_log_commit()
355 WRITE_ONCE(root->last_log_commit, commit_id); in btrfs_set_root_last_log_commit()
376 /* Indicate if we should update the inode's mtime and ctime. */
395 * If NULL, btrfs_drop_extents() will allocate and free its own path.
397 * is always released except if 'replace_extent' is true and
411 * parameter must be set as well and the 'extent_inserted' field will
426 * Set to the minimum between the input parameter 'end' and the end
455 return info->nodesize - sizeof(struct btrfs_header); in BTRFS_LEAF_DATA_SIZE()
460 return BTRFS_LEAF_DATA_SIZE(info) - sizeof(struct btrfs_item); in BTRFS_MAX_ITEM_SIZE()
470 return BTRFS_MAX_ITEM_SIZE(info) - sizeof(struct btrfs_dir_item); in BTRFS_MAX_XATTR_SIZE()
474 ((bytes) >> (fs_info)->sectorsize_bits)
499 * Compare two keys, on little-endian the disk order is same as CPU order and
512 /* Compare two keys in a memcmp fashion. */
598 return btrfs_del_items(trans, root, path, path->slots[0], 1); in btrfs_del_item()
618 * array, and in the case of setup_item_for_insert(), we would be doing
619 * it while holding a write lock on a leaf and often on upper level nodes
623 /* Size of the keys and data_sizes arrays (number of items in the batch). */
665 * Search in @root for a given @key, and store the slot found in @found_key.
677 * slot was found, 1 if there were no more leaves, and <0 if there was an error.
679 * It's recommended to use a separate variable for iter_ret and then use it to
687 (path)->slots[0]++ \
720 return root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID; in btrfs_is_data_reloc_root()