Lines Matching refs:offset
84 unsigned int offset, xa_mark_t mark) in node_get_mark() argument
86 return test_bit(offset, node_marks(node, mark)); in node_get_mark()
90 static inline bool node_set_mark(struct xa_node *node, unsigned int offset, in node_set_mark() argument
93 return __test_and_set_bit(offset, node_marks(node, mark)); in node_set_mark()
97 static inline bool node_clear_mark(struct xa_node *node, unsigned int offset, in node_clear_mark() argument
100 return __test_and_clear_bit(offset, node_marks(node, mark)); in node_clear_mark()
153 static void xas_move_index(struct xa_state *xas, unsigned long offset) in xas_move_index() argument
157 xas->xa_index += offset << shift; in xas_move_index()
203 unsigned int offset = get_offset(xas->xa_index, node); in xas_descend() local
204 void *entry = xa_entry(xas->xa, node, offset); in xas_descend()
208 offset = xa_to_sibling(entry); in xas_descend()
209 entry = xa_entry(xas->xa, node, offset); in xas_descend()
212 xas->xa_offset = offset; in xas_descend()
379 node->offset = xas->xa_offset; in xas_alloc()
490 xas->xa_offset = node->offset; in xas_delete_node()
521 unsigned int offset = 0; in xas_free_nodes() local
525 void *entry = xa_entry_locked(xas->xa, node, offset); in xas_free_nodes()
529 offset = 0; in xas_free_nodes()
533 RCU_INIT_POINTER(node->slots[offset], XA_RETRY_ENTRY); in xas_free_nodes()
534 offset++; in xas_free_nodes()
535 while (offset == XA_CHUNK_SIZE) { in xas_free_nodes()
539 offset = node->offset + 1; in xas_free_nodes()
608 xa_to_node(head)->offset = 0; in xas_expand()
659 unsigned int offset = xas->xa_offset; in xas_create() local
662 entry = xa_entry_locked(xa, node, offset); in xas_create()
663 slot = &node->slots[offset]; in xas_create()
723 xas->xa_offset = node->offset - 1; in xas_create_range()
724 if (node->offset != 0) in xas_create_range()
773 unsigned int offset, max; in xas_store() local
795 offset = xas->xa_offset; in xas_store()
798 slot = &node->slots[offset]; in xas_store()
821 if (offset == max) in xas_store()
826 if (offset == XA_CHUNK_MASK) in xas_store()
829 next = xa_entry_locked(xas->xa, node, ++offset); in xas_store()
831 if (!entry && (offset > max)) in xas_store()
873 unsigned int offset = xas->xa_offset; in xas_set_mark() local
879 if (node_set_mark(node, offset, mark)) in xas_set_mark()
881 offset = node->offset; in xas_set_mark()
902 unsigned int offset = xas->xa_offset; in xas_clear_mark() local
908 if (!node_clear_mark(node, offset, mark)) in xas_clear_mark()
913 offset = node->offset; in xas_clear_mark()
972 unsigned int offset = xas->xa_offset; in xas_pause() local
973 while (++offset < XA_CHUNK_SIZE) { in xas_pause()
974 if (!xa_is_sibling(xa_entry(xas->xa, node, offset))) in xas_pause()
977 xas->xa_index += (offset - xas->xa_offset) << node->shift; in xas_pause()
1007 xas->xa_offset = xas->xa_node->offset - 1; in __xas_prev()
1046 xas->xa_offset = xas->xa_node->offset + 1; in __xas_next()
1104 xas->xa_offset = xas->xa_node->offset + 1; in xas_find()
1151 unsigned int offset; in xas_find_marked() local
1180 xas->xa_offset = xas->xa_node->offset + 1; in xas_find_marked()
1196 offset = xas_find_chunk(xas, advance, mark); in xas_find_marked()
1197 if (offset > xas->xa_offset) { in xas_find_marked()
1199 xas_move_index(xas, offset); in xas_find_marked()
1203 xas->xa_offset = offset; in xas_find_marked()
1204 if (offset == XA_CHUNK_SIZE) in xas_find_marked()
1264 xas->xa_offset = xas->xa_node->offset; in xas_find_conflict()
1512 unsigned int offset = XA_CHUNK_MASK; in xas_set_range() local
1519 if ((sibs == XA_CHUNK_MASK) && (offset < XA_CHUNK_MASK)) in xas_set_range()
1522 if (offset == XA_CHUNK_MASK) in xas_set_range()
1523 offset = sibs & XA_CHUNK_MASK; in xas_set_range()
1528 offset = first & XA_CHUNK_MASK; in xas_set_range()
1529 if (offset + sibs > XA_CHUNK_MASK) in xas_set_range()
1530 sibs = XA_CHUNK_MASK - offset; in xas_set_range()
2015 node, node->parent ? "offset" : "max", node->offset, in xa_dump_node()