| /linux/lib/ |
| H A D | radix-tree.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 24 #include <linux/radix-tree.h> 30 #include "radix-tree.h" 33 * Radix tree node cache. 38 * The radix tree is variable-height, so an insert operation not only has 45 * of RADIX_TREE_MAX_PATH size to be created, with only the root node shared. 48 #define RADIX_TREE_PRELOAD_SIZE (RADIX_TREE_MAX_PATH * 2 - 1) 54 #define IDR_INDEX_BITS (8 /* CHAR_BIT */ * sizeof(int) - 1) 57 #define IDR_PRELOAD_SIZE (IDR_MAX_PATH * 2 - 1) 60 * Per-cpu pool of preloaded nodes [all …]
|
| H A D | rbtree_test.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 __param(int, nnodes, 100, "Number of nodes in the rb-tree"); 15 __param(int, perf_loops, 1000, "Number of iterations modifying the rb-tree"); 16 __param(int, check_loops, 100, "Number of iterations modifying and verifying the rb-tree"); 28 static struct rb_root_cached root = RB_ROOT_CACHED; variable 33 static void insert(struct test_node *node, struct rb_root_cached *root) in insert() argument 35 struct rb_node **new = &root->rb_root.rb_node, *parent = NULL; in insert() 36 u32 key = node->key; in insert() 40 if (key < rb_entry(parent, struct test_node, rb)->key) in insert() 41 new = &parent->rb_left; in insert() [all …]
|
| H A D | bootconfig.c | 1 // SPDX-License-Identifier: GPL-2.0 27 /* embedded_bootconfig_data is defined in bootconfig-data.S */ 33 *size = embedded_bootconfig_data_end - embedded_bootconfig_data; in xbc_get_embedded_bootconfig() 40 * Extra Boot Config (XBC) is given as tree-structured ascii text of 41 * key-value pairs on memory. 42 * xbc_parse() parses the text to build a simple tree. Each tree node is 43 * simply a key word or a value. A key node may have a next key node o 134 xbc_node_index(struct xbc_node * node) xbc_node_index() argument 146 xbc_node_get_parent(struct xbc_node * node) xbc_node_get_parent() argument 158 xbc_node_get_child(struct xbc_node * node) xbc_node_get_child() argument 172 xbc_node_get_next(struct xbc_node * node) xbc_node_get_next() argument 184 xbc_node_get_data(struct xbc_node * node) xbc_node_get_data() argument 195 xbc_node_match_prefix(struct xbc_node * node,const char ** prefix) xbc_node_match_prefix() argument 225 struct xbc_node *node; xbc_node_find_subkey() local 263 struct xbc_node *node = xbc_node_find_subkey(parent, key); xbc_node_find_value() local 294 xbc_node_compose_key_after(struct xbc_node * root,struct xbc_node * node,char * buf,size_t size) xbc_node_compose_key_after() argument 295 xbc_node_compose_key_after(struct xbc_node * root,struct xbc_node * node,char * buf,size_t size) xbc_node_compose_key_after() argument 343 xbc_node_find_next_leaf(struct xbc_node * root,struct xbc_node * node) xbc_node_find_next_leaf() argument 344 xbc_node_find_next_leaf(struct xbc_node * root,struct xbc_node * node) xbc_node_find_next_leaf() argument 395 xbc_node_find_next_key_value(struct xbc_node * root,struct xbc_node ** leaf) xbc_node_find_next_key_value() argument 413 xbc_init_node(struct xbc_node * node,char * data,uint16_t flag) xbc_init_node() argument 429 struct xbc_node *node; xbc_add_node() local 442 xbc_last_sibling(struct xbc_node * node) xbc_last_sibling() argument 450 xbc_last_child(struct xbc_node * node) xbc_last_child() argument 460 struct xbc_node *sib, *node = xbc_add_node(data, flag); __xbc_add_sibling() local 498 struct xbc_node *node = xbc_add_sibling(data, flag); xbc_add_child() local 613 struct xbc_node *node; xbc_parse_array() local 643 find_match_node(struct xbc_node * node,char * k) find_match_node() argument 655 struct xbc_node *node, *child; __xbc_add_key() local [all...] |
| /linux/scripts/gdb/linux/ |
| H A D | rbtree.py | 1 # SPDX-License-Identifier: GPL-2.0 12 def rb_inorder_for_each(root): argument 13 def inorder(node): argument 14 if node: 15 yield from inorder(node['rb_left']) 16 yield node 17 yield from inorder(node['rb_right']) 19 yield from inorder(root['rb_node']) 21 def rb_inorder_for_each_entry(root, gdbtype, member): argument 22 for node in rb_inorder_for_each(root): [all …]
|
| H A D | radixtree.py | 1 # SPDX-License-Identifier: GPL-2.0 20 def is_internal_node(node): argument 22 …return ((node.cast(long_type) & constants.LX_RADIX_TREE_ENTRY_MASK) == constants.LX_RADIX_TREE_INT… 24 def entry_to_node(node): argument 26 node_type = node.type 27 indirect_ptr = node.cast(long_type) & ~constants.LX_RADIX_TREE_INTERNAL_NODE 30 def node_maxindex(node): argument 31 return (constants.LX_RADIX_TREE_MAP_SIZE << node['shift']) - 1 33 def resolve_root(root): argument 34 if root.type == radix_tree_root_type.get_type(): [all …]
|
| /linux/fs/btrfs/ |
| H A D | delayed-inode.c | 1 // SPDX-License-Identifier: GPL-2.0 13 #include "delayed-inode.h" 14 #include "disk-io.h" 18 #include "inode-item.h" 19 #include "space-info.h" 21 #include "file-item.h" 33 return -ENOMEM; in btrfs_delayed_inode_init() 44 atomic_set(&delayed_root->items, 0); in btrfs_init_delayed_root() 45 atomic_set(&delayed_root->items_seq, 0); in btrfs_init_delayed_root() 46 delayed_root->nodes = 0; in btrfs_init_delayed_root() [all …]
|
| H A D | relocation.c | 1 // SPDX-License-Identifier: GPL-2.0 12 #include <linux/error-injection.h> 14 #include "disk-io.h" 19 #include "async-thread.h" 20 #include "free-space-cache.h" 22 #include "print-tree.h" 23 #include "delalloc-spac 184 mark_block_processed(struct reloc_control * rc,struct btrfs_backref_node * node) mark_block_processed() argument 203 walk_up_backref(struct btrfs_backref_node * node,struct btrfs_backref_edge * edges[],int * index) walk_up_backref() argument 247 reloc_root_is_dead(const struct btrfs_root * root) reloc_root_is_dead() argument 268 have_reloc_root(const struct btrfs_root * root) have_reloc_root() argument 277 btrfs_should_ignore_reloc_root(const struct btrfs_root * root) btrfs_should_ignore_reloc_root() argument 310 struct mapping_node *node; find_reloc_root() local 311 struct btrfs_root *root = NULL; find_reloc_root() local 338 handle_useless_nodes(struct reloc_control * rc,struct btrfs_backref_node * node) handle_useless_nodes() argument 415 struct btrfs_backref_node *node = NULL; build_backref_tree() local 479 __add_reloc_root(struct btrfs_root * root) __add_reloc_root() argument 483 struct mapping_node *node; __add_reloc_root() local 511 __del_reloc_root(struct btrfs_root * root) __del_reloc_root() argument 554 __update_reloc_root(struct btrfs_root * root) __update_reloc_root() argument 558 struct mapping_node *node = NULL; __update_reloc_root() local 584 create_reloc_root(struct btrfs_trans_handle * trans,struct btrfs_root * root,u64 objectid) create_reloc_root() argument 699 btrfs_init_reloc_root(struct btrfs_trans_handle * trans,struct btrfs_root * root) btrfs_init_reloc_root() argument 765 btrfs_update_reloc_root(struct btrfs_trans_handle * trans,struct btrfs_root * root) btrfs_update_reloc_root() argument 816 struct btrfs_root *root = BTRFS_I(reloc_inode)->root; get_new_location() local 857 replace_file_extents(struct btrfs_trans_handle * trans,struct reloc_control * rc,struct btrfs_root * root,struct extent_buffer * leaf) replace_file_extents() argument 1248 walk_up_reloc_tree(struct btrfs_root * root,struct btrfs_path * path,int * level) walk_up_reloc_tree() argument 1285 walk_down_reloc_tree(struct btrfs_root * root,struct btrfs_path * path,int * level) walk_down_reloc_tree() argument 1330 invalidate_extent_cache(struct btrfs_root * root,const struct btrfs_key * min_key,const struct btrfs_key * max_key) invalidate_extent_cache() argument 1425 insert_dirty_subvol(struct btrfs_trans_handle * trans,struct reloc_control * rc,struct btrfs_root * root) insert_dirty_subvol() argument 1454 struct btrfs_root *root; clean_dirty_subvols() local 1505 merge_reloc_root(struct reloc_control * rc,struct btrfs_root * root) merge_reloc_root() argument 1672 struct btrfs_root *root = rc->extent_root; prepare_to_merge() local 1810 struct btrfs_root *root; merge_reloc_roots() local 1929 struct btrfs_root *root; record_reloc_root_in_trans() local 1966 select_reloc_root(struct btrfs_trans_handle * trans,struct reloc_control * rc,struct btrfs_backref_node * node,struct btrfs_backref_edge * edges[]) select_reloc_root() argument 1970 struct btrfs_root *root; select_reloc_root() local 2061 select_one_root(struct btrfs_backref_node * node) select_one_root() argument 2064 struct btrfs_root *root; select_one_root() local 2103 calcu_metadata_size(struct reloc_control * rc,struct btrfs_backref_node * node) calcu_metadata_size() argument 2173 reserve_metadata_space(struct btrfs_trans_handle * trans,struct reloc_control * rc,struct btrfs_backref_node * node) reserve_metadata_space() argument 2190 do_relocation(struct btrfs_trans_handle * trans,struct reloc_control * rc,struct btrfs_backref_node * node,struct btrfs_key * key,struct btrfs_path * path,int lowest) do_relocation() argument 2197 struct btrfs_root *root; do_relocation() local 2351 link_to_upper(struct btrfs_trans_handle * trans,struct reloc_control * rc,struct btrfs_backref_node * node,struct btrfs_path * path) link_to_upper() argument 2366 struct btrfs_backref_node *node; finish_pending_nodes() local 2393 update_processed_blocks(struct reloc_control * rc,struct btrfs_backref_node * node) update_processed_blocks() argument 2458 relocate_tree_block(struct btrfs_trans_handle * trans,struct reloc_control * rc,struct btrfs_backref_node * node,struct btrfs_key * key,struct btrfs_path * path) relocate_tree_block() argument 2462 struct btrfs_root *root; relocate_tree_block() local 2551 struct btrfs_root *root; relocate_cowonly_block() local 2593 struct btrfs_backref_node *node; relocate_tree_blocks() local 2977 struct btrfs_root *root = BTRFS_I(inode)->root; relocate_data_extent() local 3208 struct btrfs_root *root = fs_info->tree_root; delete_block_group_cache() local 3547 struct btrfs_root *root = BTRFS_I(rc->data_inode)->root; relocate_block_group() local 3657 __insert_orphan_inode(struct btrfs_trans_handle * trans,struct btrfs_root * root,u64 objectid) __insert_orphan_inode() argument 3684 delete_orphan_inode(struct btrfs_trans_handle * trans,struct btrfs_root * root,u64 objectid) delete_orphan_inode() argument 3721 struct btrfs_root *root; create_reloc_inode() local 3823 struct mapping_node *node, *tmp; free_reloc_control() local 5450 mark_garbage_root(struct btrfs_root * root) mark_garbage_root() argument 5708 btrfs_reloc_cow_block(struct btrfs_trans_handle * trans,struct btrfs_root * root,const struct extent_buffer * buf,struct extent_buffer * cow) btrfs_reloc_cow_block() argument 5714 struct btrfs_backref_node *node; btrfs_reloc_cow_block() local 5777 struct btrfs_root *root = pending->root; btrfs_reloc_pre_snapshot() local 5812 struct btrfs_root *root = pending->root; btrfs_reloc_post_snapshot() local [all...] |
| H A D | backref.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include "disk-io.h" 14 #include "delayed-ref.h" 17 #include "tree-mod-log.h" 20 #include "extent-tree.h" 22 #include "tree-checker.h" 42 u64 offset = key->offse in check_extent_in_eb() 144 struct rb_root_cached root; global() member 166 struct btrfs_root *root; global() member 295 struct rb_root_cached *root; prelim_ref_insert() local 468 add_all_parents(struct btrfs_backref_walk_ctx * ctx,struct btrfs_root * root,struct btrfs_path * path,struct ulist * parents,struct preftrees * preftrees,struct prelim_ref * ref,int level) add_all_parents() argument 595 struct btrfs_root *root; resolve_indirect_ref() local 695 unode_aux_to_inode_list(struct ulist_node * node) unode_aux_to_inode_list() argument 704 struct ulist_node *node; free_leaf_list() local 737 struct ulist_node *node; resolve_indirect_refs() local 841 struct rb_node *node; add_missing_keys() local 885 struct btrfs_delayed_ref_node *node; add_delayed_refs() local 1089 u64 root; add_inline_refs() local 1195 u64 root; add_keyed_refs() local 1238 lookup_backref_shared_cache(struct btrfs_backref_share_check_ctx * ctx,struct btrfs_root * root,u64 bytenr,int level,bool * is_shared) lookup_backref_shared_cache() argument 1308 store_backref_shared_cache(struct btrfs_backref_share_check_ctx * ctx,struct btrfs_root * root,u64 bytenr,int level,bool is_shared) store_backref_shared_cache() argument 1375 struct btrfs_root *root = btrfs_extent_root(ctx->fs_info, ctx->bytenr); find_parent_nodes() local 1383 struct rb_node *node; find_parent_nodes() local 1762 struct ulist_node *node; btrfs_find_all_roots_safe() local 1848 struct btrfs_root *root = inode->root; btrfs_is_data_extent_shared() local 1852 struct ulist_node *node; btrfs_is_data_extent_shared() local 2039 btrfs_find_one_extref(struct btrfs_root * root,u64 inode_objectid,u64 start_off,struct btrfs_path * path,struct btrfs_inode_extref ** ret_extref,u64 * found_off) btrfs_find_one_extref() argument 2382 iterate_leaf_refs(struct btrfs_fs_info * fs_info,struct extent_inode_elem * inode_list,u64 root,u64 extent_item_objectid,iterate_extent_inodes_t * iterate,void * ctx) iterate_leaf_refs() argument 2531 build_ino_list(u64 inum,u64 offset,u64 num_bytes,u64 root,void * ctx) build_ino_list() argument 3042 struct btrfs_backref_node *node; btrfs_backref_alloc_node() local 3061 btrfs_backref_free_node(struct btrfs_backref_cache * cache,struct btrfs_backref_node * node) btrfs_backref_free_node() argument 3093 btrfs_backref_unlock_node_buffer(struct btrfs_backref_node * node) btrfs_backref_unlock_node_buffer() argument 3101 btrfs_backref_drop_node_buffer(struct btrfs_backref_node * node) btrfs_backref_drop_node_buffer() argument 3118 btrfs_backref_drop_node(struct btrfs_backref_cache * tree,struct btrfs_backref_node * node) btrfs_backref_drop_node() argument 3138 btrfs_backref_cleanup_node(struct btrfs_backref_cache * cache,struct btrfs_backref_node * node) btrfs_backref_cleanup_node() argument 3161 struct btrfs_backref_node *node; btrfs_backref_release_cache() local 3206 struct btrfs_root *root; handle_direct_tree_backref() local 3279 struct btrfs_root *root; handle_indirect_tree_backref() local 3646 btrfs_backref_error_cleanup(struct btrfs_backref_cache * cache,struct btrfs_backref_node * node) btrfs_backref_error_cleanup() argument [all...] |
| H A D | ref-verify.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include "disk-io.h" 12 #include "delayed-ref.h" 13 #include "ref-verify.h" 18 * Used to keep track the roots and number of refs each root has for a given 25 struct rb_node node; member 39 struct rb_node node; member 47 * action so we can account for the history properly, and we record the root we 53 u64 root; member 63 * free it until we unmount the file system in order to make sure re-allocations [all …]
|
| /linux/arch/x86/kernel/ |
| H A D | amd_node.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * AMD Node helper functions and common defines 12 #include <asm/amd/node.h> 18 * The nodes are software-visible through PCI config space. All nodes are enumerated 20 * nodes) with 0x18 corresponding to node 0, 0x19 to node 1, etc. Each node can be a 21 * multi-function device. 23 * On legacy systems, these node devices represent integrated Northbridge functionality. 24 * On Zen-based systems, these node devices represent Data Fabric functionality. 27 * "Processor x86 Core" -> "Configuration Space" section in PPRs. 29 struct pci_dev *amd_node_get_func(u16 node, u8 func) in amd_node_get_func() argument [all …]
|
| /linux/tools/lib/ |
| H A D | rbtree.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 16 * red-black trees properties: https://en.wikipedia.org/wiki/Rbtree 18 * 1) A node is either red or black 19 * 2) The root is black 21 * 4) Both children of every red node are black 22 * 5) Every simple path from root t 76 __rb_rotate_set_parents(struct rb_node * old,struct rb_node * new,struct rb_root * root,int color) __rb_rotate_set_parents() argument 85 __rb_insert(struct rb_node * node,struct rb_root * root,void (* augment_rotate)(struct rb_node * old,struct rb_node * new)) __rb_insert() argument 227 ____rb_erase_color(struct rb_node * parent,struct rb_root * root,void (* augment_rotate)(struct rb_node * old,struct rb_node * new)) ____rb_erase_color() argument 230 struct rb_node *node = NULL, *sibling, *tmp1, *tmp2; ____rb_erase_color() local 410 __rb_erase_color(struct rb_node * parent,struct rb_root * root,void (* augment_rotate)(struct rb_node * old,struct rb_node * new)) __rb_erase_color() argument 423 dummy_propagate(struct rb_node * node,struct rb_node * stop) dummy_propagate() argument 433 rb_insert_color(struct rb_node * node,struct rb_root * root) rb_insert_color() argument 438 rb_erase(struct rb_node * node,struct rb_root * root) rb_erase() argument 453 __rb_insert_augmented(struct rb_node * node,struct rb_root * root,void (* augment_rotate)(struct rb_node * old,struct rb_node * new)) __rb_insert_augmented() argument 462 rb_first(const struct rb_root * root) rb_first() argument 474 rb_last(const struct rb_root * root) rb_last() argument 486 rb_next(const struct rb_node * node) rb_next() argument 517 rb_prev(const struct rb_node * node) rb_prev() argument 546 rb_replace_node(struct rb_node * victim,struct rb_node * new,struct rb_root * root) rb_replace_node() argument 561 rb_left_deepest_node(const struct rb_node * node) rb_left_deepest_node() argument 573 rb_next_postorder(const struct rb_node * node) rb_next_postorder() argument 591 rb_first_postorder(const struct rb_root * root) rb_first_postorder() argument [all...] |
| /linux/tools/perf/util/ |
| H A D | strfilter.c | 1 // SPDX-License-Identifier: GPL-2.0 19 static void strfilter_node__delete(struct strfilter_node *node) in strfilter_node__delete() argument 21 if (node) { in strfilter_node__delete() 22 if (node->p && !is_operator(*node->p)) in strfilter_node__delete() 23 zfree((char **)&node->p); in strfilter_node__delete() 24 strfilter_node__delete(node->l); in strfilter_node__delete() 25 strfilter_node__delete(node->r); in strfilter_node__delete() 26 free(node); in strfilter_node__delete() 33 strfilter_node__delete(filter->root); in strfilter__delete() 56 if (*(p - 1) == '\\' || (*p == '!' && *(p - 1) == '[')) { in get_token() [all …]
|
| H A D | callchain.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 20 #define CALLCHAIN_HELP "setup and enables call-graph (stack chain/backtrace):\n\n" 77 struct callchain_node node; member 148 /* Indicate valid cursor node for LBR stitch */ 160 struct list_head node; member 172 static inline void callchain_init(struct callchain_root *root) in callchain_init() argument 174 INIT_LIST_HEAD(&root->nod in callchain_init() 184 callchain_cumul_hits(struct callchain_node * node) callchain_cumul_hits() argument 189 callchain_cumul_counts(struct callchain_node * node) callchain_cumul_counts() argument [all...] |
| /linux/include/linux/ |
| H A D | rbtree_augmented.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 20 * Please note - only struct rb_augment_callbacks and the prototypes for 24 * See Documentation/core-api/rbtree.rst for documentation and samples. 28 void (*propagate)(struct rb_node *node, struct rb_node *stop); 33 extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root, 40 * leading to the inserted node, then call rb_link_node() as usual and 47 rb_insert_augmented(struct rb_node *node, struct rb_root *root, in rb_insert_augmented() argument 50 __rb_insert_augmented(node, root, augment->rotate); in rb_insert_augmented() 54 rb_insert_augmented_cached(struct rb_node *node, in rb_insert_augmented_cached() argument 55 struct rb_root_cached *root, bool newleft, in rb_insert_augmented_cached() argument [all …]
|
| /linux/tools/include/linux/ |
| H A D | rbtree.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 14 See Documentation/core-api/rbtree.rst for documentation and samples. 34 #define rb_parent(r) ((struct rb_node *)((r)->__rb_parent_color & ~3)) 39 #define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL) argument 42 #define RB_EMPTY_NODE(node) \ argument 43 ((node)->__rb_parent_color == (unsigned long)(node)) 44 #define RB_CLEAR_NODE(node) \ argument 45 ((node)->__rb_parent_color = (unsigned long)(node)) 58 /* Postorder iteration - always visit the parent after its children */ 62 /* Fast replacement of a single node without remove/rebalance/add/rebalance */ [all …]
|
| H A D | rbtree_augmented.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 22 * Please note - only struct rb_augment_callbacks and the prototypes for 26 * See Documentation/core-api/rbtree.rst for documentation and samples. 30 void (*propagate)(struct rb_node *node, struct rb_node *stop); 35 extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root, 49 rb_insert_augmented(struct rb_node * node,struct rb_root * root,const struct rb_augment_callbacks * augment) rb_insert_augmented() argument 56 rb_insert_augmented_cached(struct rb_node * node,struct rb_root_cached * root,bool newleft,const struct rb_augment_callbacks * augment) rb_insert_augmented_cached() argument 57 rb_insert_augmented_cached(struct rb_node * node,struct rb_root_cached * root,bool newleft,const struct rb_augment_callbacks * augment) rb_insert_augmented_cached() argument 172 __rb_change_child(struct rb_node * old,struct rb_node * new,struct rb_node * parent,struct rb_root * root) __rb_change_child() argument 187 __rb_erase_augmented(struct rb_node * node,struct rb_root * root,const struct rb_augment_callbacks * augment) __rb_erase_augmented() argument 291 rb_erase_augmented(struct rb_node * node,struct rb_root * root,const struct rb_augment_callbacks * augment) rb_erase_augmented() argument 300 rb_erase_augmented_cached(struct rb_node * node,struct rb_root_cached * root,const struct rb_augment_callbacks * augment) rb_erase_augmented_cached() argument [all...] |
| /linux/drivers/block/drbd/ |
| H A D | drbd_interval.c | 1 // SPDX-License-Identifier: GPL-2.0-only 7 * interval_end - return end of @node 10 sector_t interval_end(struct rb_node *node) in interval_end() argument 12 struct drbd_interval *this = rb_entry(node, struct drbd_interval, rb); in interval_end() 13 return this->end; in interval_end() 16 #define NODE_END(node) ((node)->sector + ((node)->size >> 9)) argument 22 * drbd_insert_interval - insert a new interval into a tree 25 drbd_insert_interval(struct rb_root *root, struct drbd_interval *this) in drbd_insert_interval() argument 27 struct rb_node **new = &root->rb_node, *parent = NULL; in drbd_insert_interval() 28 sector_t this_end = this->sector + (this->size >> 9); in drbd_insert_interval() [all …]
|
| /linux/fs/kernfs/ |
| H A D | dir.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * fs/kernfs/dir.c - kernfs directory implementation 5 * Copyright (c) 2001-3 Patrick Mochel 19 #include "kernfs-internal.h" 35 return atomic_read(&kn->active) >= 0; in __kernfs_active() 40 lockdep_assert_held(&kernfs_root(kn)->kernfs_rwsem); in kernfs_active() 47 return kn->flag in kernfs_lockdep() 225 struct kernfs_root *root; kernfs_path_from_node() local 298 struct kernfs_root *root; kernfs_get_parent() local 386 struct rb_node **node; kernfs_link_sibling() local 512 struct kernfs_root *root = kernfs_root(kn); kernfs_drain() local 588 struct kernfs_root *root; kernfs_put() local 650 __kernfs_new_node(struct kernfs_root * root,struct kernfs_node * parent,const char * name,umode_t mode,kuid_t uid,kgid_t gid,unsigned flags) __kernfs_new_node() argument 768 kernfs_find_and_get_node_by_id(struct kernfs_root * root,u64 id) kernfs_find_and_get_node_by_id() argument 820 struct kernfs_root *root = kernfs_root(kn); kernfs_add_one() local 891 struct rb_node *node = parent->dir.children.rb_node; kernfs_find_ns() local 967 struct kernfs_root *root = kernfs_root(parent); kernfs_find_and_get_ns() local 994 struct kernfs_root *root = kernfs_root(parent); kernfs_walk_and_get_ns() local 1021 struct kernfs_root *root; kernfs_create_root() local 1077 kernfs_destroy_root(struct kernfs_root * root) kernfs_destroy_root() argument 1094 kernfs_root_to_node(struct kernfs_root * root) kernfs_root_to_node() argument 1176 struct kernfs_root *root; kernfs_dop_revalidate() local 1255 struct kernfs_root *root; kernfs_iop_lookup() local 1407 kernfs_next_descendant_post(struct kernfs_node * pos,struct kernfs_node * root) kernfs_next_descendant_post() argument 1461 struct kernfs_root *root = kernfs_root(kn); kernfs_activate() local 1486 struct kernfs_root *root = kernfs_root(kn); kernfs_show() local 1523 struct kernfs_root *root = kernfs_root(kn); kernfs_clear_inode_nlink() local 1616 struct kernfs_root *root; kernfs_remove() local 1716 struct kernfs_root *root = kernfs_root(kn); kernfs_remove_self() local 1783 struct kernfs_root *root; kernfs_remove_by_name_ns() local 1824 struct kernfs_root *root; kernfs_rename_ns() local 1925 struct rb_node *node = parent->dir.children.rb_node; kernfs_dir_pos() local 1945 struct rb_node *node = rb_next(&pos->rb); kernfs_dir_pos() local 1960 struct rb_node *node = rb_next(&pos->rb); kernfs_dir_next_pos() local 1976 struct kernfs_root *root; kernfs_fop_readdir() local [all...] |
| /linux/Documentation/translations/zh_CN/core-api/ |
| H A D | rbtree.rst | 1 .. SPDX-License-Identifier: GPL-2.0 2 .. include:: ../disclaimer-zh_CN.rst 4 :Original: Documentation/core-api/rbtree.rst 19 -------------------------- 42 https://en.wikipedia.org/wiki/Red-black_tree 45 ----------------- 55 -------------- 60 struct rb_node node; 65 宏访问。此外,个体成员可直接用rb_entry(node, type, member)访问。 72 -------------------- [all …]
|
| /linux/fs/nfs/blocklayout/ |
| H A D | extent_tree.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2014-2016 Christoph Hellwig. 14 ext_node(struct rb_node *node) in ext_node() argument 16 return rb_entry(node, struct pnfs_block_extent, be_node); in ext_node() 20 ext_tree_first(struct rb_root *root) in ext_tree_first() argument 22 struct rb_node *node = rb_first(root); in ext_tree_first() local 23 return node ? ext_node(node) : NULL; in ext_tree_first() 29 struct rb_node *node = rb_prev(&be->be_node); in ext_tree_prev() local 30 return node ? ext_node(node) : NULL; in ext_tree_prev() 36 struct rb_node *node = rb_next(&be->be_node); in ext_tree_next() local [all …]
|
| /linux/drivers/infiniband/hw/hfi1/ |
| H A D | mmu_rb.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 4 * Copyright(c) 2016 - 2017 Intel Corporation. 29 INTERVAL_TREE_DEFINE(struct mmu_rb_node, node, unsigned long, __last, 32 static unsigned long mmu_node_start(struct mmu_rb_node *node) in mmu_node_start() argument 34 return node->addr & PAGE_MASK; in mmu_node_start() 37 static unsigned long mmu_node_last(struct mmu_rb_node *node) in mmu_node_last() argument 39 return PAGE_ALIGN(node->addr + node->len) - 1; in mmu_node_last() 51 free_ptr = kzalloc(sizeof(*h) + cache_line_size() - 1, GFP_KERNEL); in hfi1_mmu_rb_register() 53 return -ENOMEM; in hfi1_mmu_rb_register() 56 h->root = RB_ROOT_CACHED; in hfi1_mmu_rb_register() [all …]
|
| /linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
| H A D | qos.c | 1 // SPDX-License-Identifier: GPL-2.0 28 struct otx2_hw *hw = &pfvf->hw; in otx2_qos_update_tx_netdev_queues() 31 qos_txqs = bitmap_weight(pfvf->qos.qos_sq_bmap, in otx2_qos_update_tx_netdev_queues() 34 tx_queues = hw->tx_queues + qos_txqs; in otx2_qos_update_tx_netdev_queues() 36 err = netif_set_real_num_tx_queues(pfvf->netdev, tx_queues); in otx2_qos_update_tx_netdev_queues() 38 netdev_err(pfvf->netdev, in otx2_qos_update_tx_netdev_queues() 44 static void otx2_qos_get_regaddr(struct otx2_qos_node *node, in otx2_qos_get_regaddr() argument 48 if (node->level == NIX_TXSCH_LVL_SMQ) { in otx2_qos_get_regaddr() 49 cfg->reg[index++] = NIX_AF_MDQX_PARENT(node->schq); in otx2_qos_get_regaddr() 50 cfg->reg[index++] = NIX_AF_MDQX_SCHEDULE(node->schq); in otx2_qos_get_regaddr() [all …]
|
| /linux/drivers/infiniband/hw/usnic/ |
| H A D | usnic_uiom_interval_tree.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 42 #define START(node) ((node)->start) argument 43 #define LAST(node) ((node)->last) argument 45 #define MAKE_NODE(node, start, end, ref_cnt, flags, err, err_out) \ argument 47 node = usnic_uiom_interval_node_alloc(start, \ 49 if (!node) { \ 50 err = -ENOMEM; \ 55 #define MARK_FOR_ADD(node, list) (list_add_tail(&node->link, list)) argument 57 #define MAKE_NODE_AND_APPEND(node, start, end, ref_cnt, flags, err, \ argument [all …]
|
| /linux/net/netfilter/ |
| H A D | nf_conncount.c | 1 // SPDX-License-Identifier: GPL-2.0-only 43 struct list_head node; member 51 struct rb_node node; member 58 struct rb_root root; 66 struct nf_conncount_root root[CONNCOUNT_SLOTS]; 79 return conn->proto.tcp.state == TCP_CONNTRACK_TIME_WAIT || in already_closed() 80 conn->prot in already_closed() 61 struct rb_root root[CONNCOUNT_SLOTS]; global() member 371 tree_nodes_free(struct rb_root * root,struct nf_conncount_rb * gc_nodes[],unsigned int gc_count) tree_nodes_free() argument 399 insert_tree(struct net * net,const struct sk_buff * skb,u16 l3num,struct nf_conncount_data * data,struct rb_root * root,unsigned int hash,const u32 * key) insert_tree() argument 494 struct rb_root *root; count_tree() local 554 struct rb_root *root; tree_gc_worker() local 555 struct rb_node *node; tree_gc_worker() local 662 struct rb_node *node; destroy_tree() local [all...] |
| /linux/tools/testing/radix-tree/ |
| H A D | test.c | 1 // SPDX-License-Identifier: GPL-2.0 12 item_tag_set(struct radix_tree_root *root, unsigned long index, int tag) in item_tag_set() argument 14 return radix_tree_tag_set(root, index, tag); in item_tag_set() 18 item_tag_clear(struct radix_tree_root *root, unsigned long index, int tag) in item_tag_clear() argument 20 return radix_tree_tag_clear(root, index, tag); in item_tag_clear() 23 int item_tag_get(struct radix_tree_root *root, unsigned long index, int tag) in item_tag_get() argument 25 return radix_tree_tag_get(root, index, tag); in item_tag_get() 32 ret->index = index; in item_create() 33 ret->order = order; in item_create() 37 int item_insert(struct radix_tree_root *root, unsigned long index) in item_insert() argument [all …]
|