Lines Matching refs:cur
88 #define XFS_BTREE_STATS_INC(cur, stat) \ argument
89 XFS_STATS_INC_OFF((cur)->bc_mp, (cur)->bc_statoff + __XBTS_ ## stat)
90 #define XFS_BTREE_STATS_ADD(cur, stat, val) \ argument
91 XFS_STATS_ADD_OFF((cur)->bc_mp, (cur)->bc_statoff + __XBTS_ ## stat, val)
125 void (*set_root)(struct xfs_btree_cur *cur,
129 int (*alloc_block)(struct xfs_btree_cur *cur,
133 int (*free_block)(struct xfs_btree_cur *cur, struct xfs_buf *bp);
136 void (*update_lastrec)(struct xfs_btree_cur *cur,
142 int (*get_minrecs)(struct xfs_btree_cur *cur, int level);
143 int (*get_maxrecs)(struct xfs_btree_cur *cur, int level);
146 int (*get_dmaxrecs)(struct xfs_btree_cur *cur, int level);
151 void (*init_rec_from_cur)(struct xfs_btree_cur *cur,
153 void (*init_ptr_from_cur)(struct xfs_btree_cur *cur,
159 int64_t (*key_diff)(struct xfs_btree_cur *cur,
168 int64_t (*diff_two_keys)(struct xfs_btree_cur *cur,
176 int (*keys_inorder)(struct xfs_btree_cur *cur,
181 int (*recs_inorder)(struct xfs_btree_cur *cur,
196 enum xbtree_key_contig (*keys_contiguous)(struct xfs_btree_cur *cur,
332 xfs_failaddr_t __xfs_btree_check_lblock(struct xfs_btree_cur *cur,
334 xfs_failaddr_t __xfs_btree_check_sblock(struct xfs_btree_cur *cur,
342 struct xfs_btree_cur *cur, /* btree cursor */
352 struct xfs_btree_cur *cur, /* btree cursor */
361 struct xfs_btree_cur *cur, /* btree cursor */
370 struct xfs_btree_cur *cur, /* btree cursor */
379 struct xfs_btree_cur *cur, /* input cursor */
464 int xfs_btree_change_owner(struct xfs_btree_cur *cur, uint64_t new_owner,
535 typedef int (*xfs_btree_query_range_fn)(struct xfs_btree_cur *cur,
538 int xfs_btree_query_range(struct xfs_btree_cur *cur,
542 int xfs_btree_query_all(struct xfs_btree_cur *cur, xfs_btree_query_range_fn fn,
545 typedef int (*xfs_btree_visit_blocks_fn)(struct xfs_btree_cur *cur, int level,
554 int xfs_btree_visit_blocks(struct xfs_btree_cur *cur,
557 int xfs_btree_count_blocks(struct xfs_btree_cur *cur, xfs_extlen_t *blocks);
559 union xfs_btree_rec *xfs_btree_rec_addr(struct xfs_btree_cur *cur, int n,
561 union xfs_btree_key *xfs_btree_key_addr(struct xfs_btree_cur *cur, int n,
563 union xfs_btree_key *xfs_btree_high_key_addr(struct xfs_btree_cur *cur, int n,
565 union xfs_btree_ptr *xfs_btree_ptr_addr(struct xfs_btree_cur *cur, int n,
567 int xfs_btree_lookup_get_block(struct xfs_btree_cur *cur, int level,
569 struct xfs_btree_block *xfs_btree_get_block(struct xfs_btree_cur *cur,
571 bool xfs_btree_ptr_is_null(struct xfs_btree_cur *cur,
573 int64_t xfs_btree_diff_two_ptrs(struct xfs_btree_cur *cur,
576 void xfs_btree_get_sibling(struct xfs_btree_cur *cur,
579 void xfs_btree_get_keys(struct xfs_btree_cur *cur,
581 union xfs_btree_key *xfs_btree_high_key_from_key(struct xfs_btree_cur *cur,
583 typedef bool (*xfs_btree_key_gap_fn)(struct xfs_btree_cur *cur,
587 int xfs_btree_has_records(struct xfs_btree_cur *cur,
593 bool xfs_btree_has_more_records(struct xfs_btree_cur *cur);
594 struct xfs_ifork *xfs_btree_ifork_ptr(struct xfs_btree_cur *cur);
599 struct xfs_btree_cur *cur, in xfs_btree_keycmp_lt() argument
603 return cur->bc_ops->diff_two_keys(cur, key1, key2, NULL) < 0; in xfs_btree_keycmp_lt()
608 struct xfs_btree_cur *cur, in xfs_btree_keycmp_gt() argument
612 return cur->bc_ops->diff_two_keys(cur, key1, key2, NULL) > 0; in xfs_btree_keycmp_gt()
617 struct xfs_btree_cur *cur, in xfs_btree_keycmp_eq() argument
621 return cur->bc_ops->diff_two_keys(cur, key1, key2, NULL) == 0; in xfs_btree_keycmp_eq()
626 struct xfs_btree_cur *cur, in xfs_btree_keycmp_le() argument
630 return !xfs_btree_keycmp_gt(cur, key1, key2); in xfs_btree_keycmp_le()
635 struct xfs_btree_cur *cur, in xfs_btree_keycmp_ge() argument
639 return !xfs_btree_keycmp_lt(cur, key1, key2); in xfs_btree_keycmp_ge()
644 struct xfs_btree_cur *cur, in xfs_btree_keycmp_ne() argument
648 return !xfs_btree_keycmp_eq(cur, key1, key2); in xfs_btree_keycmp_ne()
654 struct xfs_btree_cur *cur, in xfs_btree_masked_keycmp_lt() argument
659 return cur->bc_ops->diff_two_keys(cur, key1, key2, mask) < 0; in xfs_btree_masked_keycmp_lt()
664 struct xfs_btree_cur *cur, in xfs_btree_masked_keycmp_gt() argument
669 return cur->bc_ops->diff_two_keys(cur, key1, key2, mask) > 0; in xfs_btree_masked_keycmp_gt()
674 struct xfs_btree_cur *cur, in xfs_btree_masked_keycmp_ge() argument
679 return !xfs_btree_masked_keycmp_lt(cur, key1, key2, mask); in xfs_btree_masked_keycmp_ge()
685 struct xfs_btree_cur *cur, in xfs_btree_islastblock() argument
691 block = xfs_btree_get_block(cur, level, &bp); in xfs_btree_islastblock()
693 if (cur->bc_flags & XFS_BTREE_LONG_PTRS) in xfs_btree_islastblock()
698 void xfs_btree_set_ptr_null(struct xfs_btree_cur *cur,
700 int xfs_btree_get_buf_block(struct xfs_btree_cur *cur,
703 void xfs_btree_set_sibling(struct xfs_btree_cur *cur,
706 void xfs_btree_init_block_cur(struct xfs_btree_cur *cur,
708 void xfs_btree_copy_ptrs(struct xfs_btree_cur *cur,
711 void xfs_btree_copy_keys(struct xfs_btree_cur *cur,
723 struct xfs_btree_cur *cur; in xfs_btree_alloc_cursor() local
725 cur = kmem_cache_zalloc(cache, GFP_NOFS | __GFP_NOFAIL); in xfs_btree_alloc_cursor()
726 cur->bc_tp = tp; in xfs_btree_alloc_cursor()
727 cur->bc_mp = mp; in xfs_btree_alloc_cursor()
728 cur->bc_btnum = btnum; in xfs_btree_alloc_cursor()
729 cur->bc_maxlevels = maxlevels; in xfs_btree_alloc_cursor()
730 cur->bc_cache = cache; in xfs_btree_alloc_cursor()
732 return cur; in xfs_btree_alloc_cursor()