Lines Matching refs:p
130 xtpage_t *p; in xtLookup() local
164 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in xtLookup()
179 xad = &p->xad[index]; in xtLookup()
223 xtpage_t *p; /* page */ in xtSearch() local
255 XT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in xtSearch()
267 (p->header.flag & BT_LEAF) && in xtSearch()
269 le16_to_cpu(p->header.nextindex)) { in xtSearch()
270 xad = &p->xad[index]; in xtSearch()
285 le16_to_cpu(p->header.nextindex)) { in xtSearch()
326 if (p->header.nextindex == /* little-endian */ in xtSearch()
327 p->header.maxentry) in xtSearch()
352 lim = le16_to_cpu(p->header.nextindex) - XTENTRYSTART; in xtSearch()
360 XT_CMP(cmp, xoff, &p->xad[index], t64); in xtSearch()
368 if (p->header.flag & BT_LEAF) { in xtSearch()
373 if (p->header.nextindex == in xtSearch()
374 p->header.maxentry) in xtSearch()
401 if (index < le16_to_cpu(p->header.nextindex)-1) in xtSearch()
402 next = offsetXAD(&p->xad[index + 1]); in xtSearch()
418 if (base < le16_to_cpu(p->header.nextindex)) in xtSearch()
419 next = offsetXAD(&p->xad[base]); in xtSearch()
426 if (p->header.flag & BT_LEAF) { in xtSearch()
431 if (p->header.nextindex == in xtSearch()
432 p->header.maxentry) in xtSearch()
472 if (p->header.nextindex == p->header.maxentry) in xtSearch()
486 bn = addressXAD(&p->xad[index]); in xtSearch()
520 xtpage_t *p; /* base B+-tree index page */ in xtInsert() local
545 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in xtInsert()
561 xad = &p->xad[index - 1]; in xtInsert()
584 nextindex = le16_to_cpu(p->header.nextindex); in xtInsert()
585 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtInsert()
618 memmove(&p->xad[index + 1], &p->xad[index], in xtInsert()
622 xad = &p->xad[index]; in xtInsert()
626 le16_add_cpu(&p->header.nextindex, 1); in xtInsert()
636 le16_to_cpu(p->header.nextindex) - xtlck->lwm.offset; in xtInsert()
944 xtpage_t *p; in xtSplitPage() local
1065 XT_GETPAGE(ip, nextbn, mp, PSIZE, p, rc); in xtSplitPage()
1080 p->header.prev = cpu_to_le64(rbn); in xtSplitPage()
1344 xtpage_t *p; /* base B+-tree index page */ in xtExtend() local
1361 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in xtExtend()
1370 xad = &p->xad[index]; in xtExtend()
1399 nextindex = le16_to_cpu(p->header.nextindex); in xtExtend()
1407 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtExtend()
1420 XT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in xtExtend()
1428 if (p->header.flag & BT_INTERNAL) { in xtExtend()
1429 ASSERT(p->header.nextindex == in xtExtend()
1431 xad = &p->xad[XTENTRYSTART]; in xtExtend()
1436 XT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in xtExtend()
1452 xad = &p->xad[index + 1]; in xtExtend()
1456 le16_add_cpu(&p->header.nextindex, 1); in xtExtend()
1460 xad = &p->xad[index]; in xtExtend()
1476 le16_to_cpu(p->header.nextindex) - xtlck->lwm.offset; in xtExtend()
1503 xtpage_t *p; /* base B+-tree index page */ in xtUpdate() local
1526 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index0); in xtUpdate()
1543 xad = &p->xad[index0]; in xtUpdate()
1560 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
1573 lxad = &p->xad[index - 1]; in xtUpdate()
1601 memmove(&p->xad[index], &p->xad[index + 1], in xtUpdate()
1605 p->header.nextindex = in xtUpdate()
1606 cpu_to_le16(le16_to_cpu(p->header.nextindex) - in xtUpdate()
1611 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
1644 rxad = &p->xad[index + 1]; in xtUpdate()
1669 memmove(&p->xad[index], &p->xad[index + 1], in xtUpdate()
1672 p->header.nextindex = in xtUpdate()
1673 cpu_to_le16(le16_to_cpu(p->header.nextindex) - in xtUpdate()
1696 xad = &p->xad[index]; in xtUpdate()
1700 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
1714 XT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in xtUpdate()
1722 if (p->header.flag & BT_INTERNAL) { in xtUpdate()
1723 ASSERT(p->header.nextindex == in xtUpdate()
1725 xad = &p->xad[XTENTRYSTART]; in xtUpdate()
1730 XT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in xtUpdate()
1742 (le16_to_cpu(p->header.maxentry) >> 1)) { in xtUpdate()
1745 le16_to_cpu(p->header.nextindex) + in xtUpdate()
1753 memmove(&p->xad[newindex + 1], &p->xad[newindex], in xtUpdate()
1757 xad = &p->xad[newindex]; in xtUpdate()
1762 p->header.nextindex = in xtUpdate()
1763 cpu_to_le16(le16_to_cpu(p->header.nextindex) + 1); in xtUpdate()
1783 le16_to_cpu(p->header.nextindex) - in xtUpdate()
1787 bn = le64_to_cpu(p->header.next); in xtUpdate()
1791 XT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in xtUpdate()
1806 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
1812 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
1819 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index0); in xtUpdate()
1843 xad = &p->xad[index]; in xtUpdate()
1851 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
1867 XT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in xtUpdate()
1876 if (p->header.flag & BT_INTERNAL) { in xtUpdate()
1877 ASSERT(p->header.nextindex == in xtUpdate()
1879 xad = &p->xad[XTENTRYSTART]; in xtUpdate()
1884 XT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in xtUpdate()
1897 memmove(&p->xad[newindex + 1], &p->xad[newindex], in xtUpdate()
1901 xad = &p->xad[newindex]; in xtUpdate()
1905 p->header.nextindex = in xtUpdate()
1906 cpu_to_le16(le16_to_cpu(p->header.nextindex) + 1); in xtUpdate()
1913 xtlck->lwm.length = le16_to_cpu(p->header.nextindex) - in xtUpdate()
1949 xtpage_t *p; /* base B+-tree index page */ in xtAppend() local
1980 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in xtAppend()
2001 nextindex = le16_to_cpu(p->header.nextindex); in xtAppend()
2002 if (nextindex < le16_to_cpu(p->header.maxentry)) in xtAppend()
2073 xad = &p->xad[index]; in xtAppend()
2077 le16_add_cpu(&p->header.nextindex, 1); in xtAppend()
2081 xtlck->lwm.length = le16_to_cpu(p->header.nextindex) - in xtAppend()
2101 xtroot_t *p; in xtInitRoot() local
2110 p = &JFS_IP(ip)->i_xtroot; in xtInitRoot()
2112 p->header.flag = DXD_INDEX | BT_ROOT | BT_LEAF; in xtInitRoot()
2113 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtInitRoot()
2116 p->header.maxentry = cpu_to_le16(XTROOTINITSLOT_DIR); in xtInitRoot()
2118 p->header.maxentry = cpu_to_le16(XTROOTINITSLOT); in xtInitRoot()
2193 xtpage_t *p; in xtTruncate() local
2271 XT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in xtTruncate()
2276 index = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
2283 if (p->header.next) { in xtTruncate()
2292 p->header.next = 0; in xtTruncate()
2295 if (p->header.flag & BT_INTERNAL) in xtTruncate()
2304 xad = &p->xad[index]; in xtTruncate()
2326 xtlck->hwm.offset = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
2334 xad = &p->xad[index]; in xtTruncate()
2431 if (nextindex < le16_to_cpu(p->header.nextindex)) { in xtTruncate()
2433 xadlock.xdlist = &p->xad[nextindex]; in xtTruncate()
2435 le16_to_cpu(p->header.nextindex) - in xtTruncate()
2440 p->header.nextindex = cpu_to_le16(nextindex); in xtTruncate()
2464 xadlock.xdlist = &p->xad[XTENTRYSTART]; in xtTruncate()
2466 le16_to_cpu(p->header.nextindex) - XTENTRYSTART; in xtTruncate()
2470 if (p->header.flag & BT_ROOT) { in xtTruncate()
2471 p->header.flag &= ~BT_INTERNAL; in xtTruncate()
2472 p->header.flag |= BT_LEAF; in xtTruncate()
2473 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtTruncate()
2509 XT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in xtTruncate()
2520 if (index < le16_to_cpu(p->header.nextindex) - 1) { in xtTruncate()
2530 le16_to_cpu(p->header. in xtTruncate()
2538 xadlock.xdlist = &p->xad[index + 1]; in xtTruncate()
2540 le16_to_cpu(p->header.nextindex) - in xtTruncate()
2547 p->header.nextindex = cpu_to_le16(index + 1); in xtTruncate()
2556 nfreed += lengthXAD(&p->xad[index]); in xtTruncate()
2605 le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
2610 xadlock.xdlist = &p->xad[XTENTRYSTART]; in xtTruncate()
2612 le16_to_cpu(p->header.nextindex) - in xtTruncate()
2619 if (p->header.flag & BT_ROOT) { in xtTruncate()
2620 p->header.flag &= ~BT_INTERNAL; in xtTruncate()
2621 p->header.flag |= BT_LEAF; in xtTruncate()
2622 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtTruncate()
2623 if (le16_to_cpu(p->header.maxentry) == XTROOTMAXSLOT) { in xtTruncate()
2628 p->header.maxentry = in xtTruncate()
2685 xad = &p->xad[index]; in xtTruncate()
2752 xtpage_t *p; in xtTruncate_pmap() local
2775 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in xtTruncate_pmap()
2794 XT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in xtTruncate_pmap()
2799 index = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate_pmap()
2801 if (p->header.flag & BT_INTERNAL) in xtTruncate_pmap()
2814 xad = &p->xad[index]; in xtTruncate_pmap()
2839 XT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in xtTruncate_pmap()
2855 xtlck->hwm.offset = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate_pmap()
2860 if (p->header.flag & BT_ROOT) { in xtTruncate_pmap()
2885 xad = &p->xad[index]; in xtTruncate_pmap()