Lines Matching refs:block
91 xfs_inobt_block_t *block; /* btree block record/key lives in */ in xfs_inobt_delrec() local
133 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_delrec()
135 if ((error = xfs_btree_check_sblock(cur, block, level, bp))) in xfs_inobt_delrec()
142 numrecs = INT_GET(block->bb_numrecs, ARCH_CONVERT); in xfs_inobt_delrec()
153 kp = XFS_INOBT_KEY_ADDR(block, 1, cur); in xfs_inobt_delrec()
154 pp = XFS_INOBT_PTR_ADDR(block, 1, cur); in xfs_inobt_delrec()
175 rp = XFS_INOBT_REC_ADDR(block, 1, cur); in xfs_inobt_delrec()
194 INT_SET(block->bb_numrecs, ARCH_CONVERT, numrecs); in xfs_inobt_delrec()
258 rbno = INT_GET(block->bb_rightsib, ARCH_CONVERT); in xfs_inobt_delrec()
259 lbno = INT_GET(block->bb_leftsib, ARCH_CONVERT); in xfs_inobt_delrec()
307 ASSERT(INT_GET(block->bb_numrecs, ARCH_CONVERT) >= in xfs_inobt_delrec()
367 ASSERT(INT_GET(block->bb_numrecs, ARCH_CONVERT) >= in xfs_inobt_delrec()
401 right = block; in xfs_inobt_delrec()
423 left = block; in xfs_inobt_delrec()
558 xfs_inobt_block_t *block; /* btree block record/key lives in */ in xfs_inobt_insrec() local
600 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_insrec()
601 numrecs = INT_GET(block->bb_numrecs, ARCH_CONVERT); in xfs_inobt_insrec()
603 if ((error = xfs_btree_check_sblock(cur, block, level, bp))) in xfs_inobt_insrec()
610 rp = XFS_INOBT_REC_ADDR(block, ptr, cur); in xfs_inobt_insrec()
613 kp = XFS_INOBT_KEY_ADDR(block, ptr, cur); in xfs_inobt_insrec()
653 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_insrec()
656 block, level, bp))) in xfs_inobt_insrec()
675 numrecs = INT_GET(block->bb_numrecs, ARCH_CONVERT); in xfs_inobt_insrec()
681 kp = XFS_INOBT_KEY_ADDR(block, 1, cur); in xfs_inobt_insrec()
682 pp = XFS_INOBT_PTR_ADDR(block, 1, cur); in xfs_inobt_insrec()
703 INT_SET(block->bb_numrecs, ARCH_CONVERT, numrecs); in xfs_inobt_insrec()
710 rp = XFS_INOBT_REC_ADDR(block, 1, cur); in xfs_inobt_insrec()
719 INT_SET(block->bb_numrecs, ARCH_CONVERT, numrecs); in xfs_inobt_insrec()
791 xfs_inobt_block_t *block; /* btree block to log from */ in xfs_inobt_log_keys() local
796 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_log_keys()
797 kp = XFS_INOBT_KEY_ADDR(block, 1, cur); in xfs_inobt_log_keys()
798 first = (int)((xfs_caddr_t)&kp[kfirst - 1] - (xfs_caddr_t)block); in xfs_inobt_log_keys()
799 last = (int)(((xfs_caddr_t)&kp[klast] - 1) - (xfs_caddr_t)block); in xfs_inobt_log_keys()
813 xfs_inobt_block_t *block; /* btree block to log from */ in xfs_inobt_log_ptrs() local
818 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_log_ptrs()
819 pp = XFS_INOBT_PTR_ADDR(block, 1, cur); in xfs_inobt_log_ptrs()
820 first = (int)((xfs_caddr_t)&pp[pfirst - 1] - (xfs_caddr_t)block); in xfs_inobt_log_ptrs()
821 last = (int)(((xfs_caddr_t)&pp[plast] - 1) - (xfs_caddr_t)block); in xfs_inobt_log_ptrs()
835 xfs_inobt_block_t *block; /* btree block to log from */ in xfs_inobt_log_recs() local
840 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_log_recs()
841 rp = XFS_INOBT_REC_ADDR(block, 1, cur); in xfs_inobt_log_recs()
842 first = (int)((xfs_caddr_t)&rp[rfirst - 1] - (xfs_caddr_t)block); in xfs_inobt_log_recs()
843 last = (int)(((xfs_caddr_t)&rp[rlast] - 1) - (xfs_caddr_t)block); in xfs_inobt_log_recs()
859 xfs_inobt_block_t *block=NULL; /* current btree block */ in xfs_inobt_lookup() local
910 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_lookup()
911 if ((error = xfs_btree_check_sblock(cur, block, level, in xfs_inobt_lookup()
915 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_lookup()
935 kkbase = XFS_INOBT_KEY_ADDR(block, 1, cur); in xfs_inobt_lookup()
937 krbase = XFS_INOBT_REC_ADDR(block, 1, cur); in xfs_inobt_lookup()
942 if (!(high = INT_GET(block->bb_numrecs, ARCH_CONVERT))) { in xfs_inobt_lookup()
1009 agbno = INT_GET(*XFS_INOBT_PTR_ADDR(block, keyno, cur), ARCH_CONVERT); in xfs_inobt_lookup()
1028 keyno > INT_GET(block->bb_numrecs, ARCH_CONVERT) && in xfs_inobt_lookup()
1029 INT_GET(block->bb_rightsib, ARCH_CONVERT) != NULLAGBLOCK) { in xfs_inobt_lookup()
1046 if (keyno == 0 || keyno > INT_GET(block->bb_numrecs, ARCH_CONVERT)) in xfs_inobt_lookup()
1205 xfs_inobt_block_t *block; /* one half of the old root block */ in xfs_inobt_newroot() local
1261 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_newroot()
1263 if ((error = xfs_btree_check_sblock(cur, block, cur->bc_nlevels - 1, bp))) in xfs_inobt_newroot()
1266 if (INT_GET(block->bb_rightsib, ARCH_CONVERT) != NULLAGBLOCK) { in xfs_inobt_newroot()
1272 left = block; in xfs_inobt_newroot()
1289 right = block; in xfs_inobt_newroot()
1650 xfs_inobt_block_t *block; /* btree block */ in xfs_inobt_updkey() local
1657 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_updkey()
1659 if ((error = xfs_btree_check_sblock(cur, block, level, bp))) in xfs_inobt_updkey()
1663 kp = XFS_INOBT_KEY_ADDR(block, ptr, cur); in xfs_inobt_updkey()
1684 xfs_inobt_block_t *block; /* btree block */ in xfs_inobt_decrement() local
1704 block = XFS_BUF_TO_INOBT_BLOCK(cur->bc_bufs[level]); in xfs_inobt_decrement()
1706 if ((error = xfs_btree_check_sblock(cur, block, level, in xfs_inobt_decrement()
1713 if (INT_GET(block->bb_leftsib, ARCH_CONVERT) == NULLAGBLOCK) { in xfs_inobt_decrement()
1738 for (block = XFS_BUF_TO_INOBT_BLOCK(cur->bc_bufs[lev]); lev > level; ) { in xfs_inobt_decrement()
1742 agbno = INT_GET(*XFS_INOBT_PTR_ADDR(block, cur->bc_ptrs[lev], cur), ARCH_CONVERT); in xfs_inobt_decrement()
1749 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_decrement()
1750 if ((error = xfs_btree_check_sblock(cur, block, lev, bp))) in xfs_inobt_decrement()
1752 cur->bc_ptrs[lev] = INT_GET(block->bb_numrecs, ARCH_CONVERT); in xfs_inobt_decrement()
1807 xfs_inobt_block_t *block; /* btree block */ in xfs_inobt_get_rec() local
1817 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_get_rec()
1819 if ((error = xfs_btree_check_sblock(cur, block, 0, bp))) in xfs_inobt_get_rec()
1825 if (ptr > INT_GET(block->bb_numrecs, ARCH_CONVERT) || ptr <= 0) { in xfs_inobt_get_rec()
1832 rec = XFS_INOBT_REC_ADDR(block, ptr, cur); in xfs_inobt_get_rec()
1857 xfs_inobt_block_t *block; /* btree block */ in xfs_inobt_increment() local
1871 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_increment()
1873 if ((error = xfs_btree_check_sblock(cur, block, level, bp))) in xfs_inobt_increment()
1880 if (++cur->bc_ptrs[level] <= INT_GET(block->bb_numrecs, ARCH_CONVERT)) { in xfs_inobt_increment()
1887 if (INT_GET(block->bb_rightsib, ARCH_CONVERT) == NULLAGBLOCK) { in xfs_inobt_increment()
1897 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_increment()
1899 if ((error = xfs_btree_check_sblock(cur, block, lev, bp))) in xfs_inobt_increment()
1902 if (++cur->bc_ptrs[lev] <= INT_GET(block->bb_numrecs, ARCH_CONVERT)) in xfs_inobt_increment()
1918 for (bp = cur->bc_bufs[lev], block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_increment()
1922 agbno = INT_GET(*XFS_INOBT_PTR_ADDR(block, cur->bc_ptrs[lev], cur), ARCH_CONVERT); in xfs_inobt_increment()
1929 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_increment()
1930 if ((error = xfs_btree_check_sblock(cur, block, lev, bp))) in xfs_inobt_increment()
2064 xfs_inobt_block_t *block; /* btree block to update */ in xfs_inobt_update() local
2074 block = XFS_BUF_TO_INOBT_BLOCK(bp); in xfs_inobt_update()
2076 if ((error = xfs_btree_check_sblock(cur, block, 0, bp))) in xfs_inobt_update()
2083 rp = XFS_INOBT_REC_ADDR(block, ptr, cur); in xfs_inobt_update()