Lines Matching defs:root
18 * Lockdep class keys for extent_buffer->lock's in this root. For a given
24 * static, assign keysets according to the purpose of the root as indicated
59 u64 id; /* root objectid */
64 { .id = BTRFS_ROOT_TREE_OBJECTID, DEFINE_NAME("root") },
96 void btrfs_maybe_reset_lockdep_class(struct btrfs_root *root, struct extent_buffer *eb)
98 if (test_bit(BTRFS_ROOT_RESET_LOCKDEP_CLASS, &root->state))
99 btrfs_set_buffer_lockdep_class(root->root_key.objectid,
220 * way up to the root.
245 * Loop around taking references on and locking the root node of the tree until
246 * we end up with a lock on the root node.
248 * Return: root extent buffer with write lock held
250 struct extent_buffer *btrfs_lock_root_node(struct btrfs_root *root)
255 eb = btrfs_root_node(root);
257 btrfs_maybe_reset_lockdep_class(root, eb);
259 if (eb == root->node)
268 * Loop around taking references on and locking the root node of the tree until
269 * we end up with a lock on the root node.
271 * Return: root extent buffer with read lock held
273 struct extent_buffer *btrfs_read_lock_root_node(struct btrfs_root *root)
278 eb = btrfs_root_node(root);
280 btrfs_maybe_reset_lockdep_class(root, eb);
282 if (eb == root->node)
291 * Loop around taking references on and locking the root node of the tree in
292 * nowait mode until we end up with a lock on the root node or returning to
295 * Return: root extent buffer with read lock held or -EAGAIN.
297 struct extent_buffer *btrfs_try_read_lock_root_node(struct btrfs_root *root)
302 eb = btrfs_root_node(root);
307 if (eb == root->node)