Lines Matching refs:index
80 s16 index; member
142 int index; in xtLookup() local
175 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in xtLookup()
190 xad = &p->xad[index]; in xtLookup()
236 int base, index, lim, btindex; in xtSearch() local
279 (index = jfs_ip->btindex) < in xtSearch()
281 xad = &p->xad[index]; in xtSearch()
294 index++; in xtSearch()
295 if (index < in xtSearch()
348 btsp->index = index; in xtSearch()
352 jfs_ip->btindex = index; in xtSearch()
369 index = base + (lim >> 1); in xtSearch()
371 XT_CMP(cmp, xoff, &p->xad[index], t64); in xtSearch()
395 btsp->index = index; in xtSearch()
400 if (index == btindex || in xtSearch()
401 index == btindex + 1) in xtSearch()
405 jfs_ip->btindex = index; in xtSearch()
412 if (index < le16_to_cpu(p->header.nextindex)-1) in xtSearch()
413 next = offsetXAD(&p->xad[index + 1]); in xtSearch()
418 base = index + 1; in xtSearch()
453 btsp->index = base; in xtSearch()
476 index = base ? base - 1 : base; in xtSearch()
494 BT_PUSH(btstack, bn, index); in xtSearch()
497 bn = addressXAD(&p->xad[index]); in xtSearch()
533 int index, nextindex; in xtInsert() local
556 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in xtInsert()
571 if (index > XTENTRYSTART) { in xtInsert()
572 xad = &p->xad[index - 1]; in xtInsert()
598 split.index = index; in xtInsert()
628 if (index < nextindex) in xtInsert()
629 memmove(&p->xad[index + 1], &p->xad[index], in xtInsert()
630 (nextindex - index) * sizeof(xad_t)); in xtInsert()
633 xad = &p->xad[index]; in xtInsert()
644 (xtlck->lwm.offset) ? min(index, in xtInsert()
645 (int)xtlck->lwm.offset) : index; in xtInsert()
716 skip = split->index; in xtSplitUp()
831 skip = parent->index + 1; in xtSplitUp()
843 split->index = skip; /* index at insert */ in xtSplitUp()
1028 skip = split->index; in xtSplitPage()
1280 skip = split->index; in xtSplitRoot()
1357 int index, nextindex, len; in xtExtend() local
1372 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in xtExtend()
1381 xad = &p->xad[index]; in xtExtend()
1421 split.index = index + 1; in xtExtend()
1463 xad = &p->xad[index + 1]; in xtExtend()
1471 xad = &p->xad[index]; in xtExtend()
1484 (xtlck->lwm.offset) ? min(index, in xtExtend()
1485 (int)xtlck->lwm.offset) : index; in xtExtend()
1520 int index, nextindex, llen, rlen; in xtTailgate() local
1539 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in xtTailgate()
1549 if (index != nextindex - 1) { in xtTailgate()
1565 xad = &p->xad[index]; in xtTailgate()
1586 split.index = index + 1; in xtTailgate()
1628 xad = &p->xad[index + 1]; in xtTailgate()
1636 xad = &p->xad[index]; in xtTailgate()
1652 pxdlock->index = 1; in xtTailgate()
1667 min(index, (int)xtlck->lwm.offset) : index; in xtTailgate()
1699 int index0, index, newindex, nextindex; in xtUpdate() local
1752 index = index0; in xtUpdate()
1753 newindex = index + 1; in xtUpdate()
1783 if (index == XTENTRYSTART) in xtUpdate()
1787 lxad = &p->xad[index - 1]; in xtUpdate()
1794 index0 = index - 1; in xtUpdate()
1814 if (index < nextindex - 1) in xtUpdate()
1815 memmove(&p->xad[index], &p->xad[index + 1], in xtUpdate()
1816 (nextindex - index - in xtUpdate()
1823 index = index0; in xtUpdate()
1824 newindex = index + 1; in xtUpdate()
1858 rxad = &p->xad[index + 1]; in xtUpdate()
1883 memmove(&p->xad[index], &p->xad[index + 1], in xtUpdate()
1884 (nextindex - index - 1) << L2XTSLOTSIZE); in xtUpdate()
1911 xad = &p->xad[index]; in xtUpdate()
1919 split.index = newindex; in xtUpdate()
2016 index0 = index = newindex; in xtUpdate()
2018 index++; in xtUpdate()
2020 newindex = index + 1; in xtUpdate()
2042 if (index0 != index) { in xtUpdate()
2058 xad = &p->xad[index]; in xtUpdate()
2072 split.index = newindex; in xtUpdate()
2166 int index, nextindex; in xtAppend() local
2195 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in xtAppend()
2252 split.index = index; in xtAppend()
2288 xad = &p->xad[index]; in xtAppend()
2295 (xtlck->lwm.offset) ? min(index,(int) xtlck->lwm.offset) : index; in xtAppend()
2334 int index, nextindex; in xtDelete() local
2344 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in xtDelete()
2372 (xtlck->lwm.offset) ? min(index, xtlck->lwm.offset) : index; in xtDelete()
2375 if (index < nextindex - 1) in xtDelete()
2376 memmove(&p->xad[index], &p->xad[index + 1], in xtDelete()
2377 (nextindex - index - 1) * sizeof(xad_t)); in xtDelete()
2403 int index, nextindex; in xtDeleteUp() local
2454 index = parent->index; in xtDeleteUp()
2506 (xtlck->lwm.offset) ? min(index, in xtDeleteUp()
2508 offset) : index; in xtDeleteUp()
2513 if (index < nextindex - 1) in xtDeleteUp()
2514 memmove(&p->xad[index], &p->xad[index + 1], in xtDeleteUp()
2515 (nextindex - index - in xtDeleteUp()
2520 (ulong) parent->bn, index); in xtDeleteUp()
2566 int index; in xtRelocate() local
2595 XT_GETSEARCH(ip, btstack.top, bn, pmp, pp, index); in xtRelocate()
2603 xad = &pp->xad[index]; in xtRelocate()
2616 XT_GETSEARCH(ip, btstack.top, bn, pmp, pp, index); in xtRelocate()
2625 xad = &pp->xad[index]; in xtRelocate()
2699 XT_GETSEARCH(ip, btstack.top, bn, pmp, pp, index); in xtRelocate()
2830 pxdlock->index = 1; in xtRelocate()
2845 xad = &pp->xad[index]; in xtRelocate()
2849 xtlck->lwm.offset = min(index, xtlck->lwm.offset); in xtRelocate()
2888 int base, index, lim; in xtSearchNode() local
2930 index = base + (lim >> 1); in xtSearchNode()
2932 XT_CMP(cmp, xoff, &p->xad[index], t64); in xtSearchNode()
2939 if (xaddr == addressXAD(&p->xad[index]) && in xtSearchNode()
2940 xoff == offsetXAD(&p->xad[index])) { in xtSearchNode()
2946 btsp->index = index; in xtSearchNode()
2957 base = index + 1; in xtSearchNode()
2970 index = base ? base - 1 : base; in xtSearchNode()
2977 bn = addressXAD(&p->xad[index]); in xtSearchNode()
3156 int index, nextindex; in xtTruncate() local
3187 xadlock.index = 1; in xtTruncate()
3237 index = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
3265 xad = &p->xad[index]; in xtTruncate()
3294 for (; index >= XTENTRYSTART; index--) { in xtTruncate()
3295 xad = &p->xad[index]; in xtTruncate()
3333 if (index == XTENTRYSTART) in xtTruncate()
3336 nextindex = index; in xtTruncate()
3354 min(index, (int)xtlck->lwm.offset) : index; in xtTruncate()
3355 xtlck->lwm.length = index + 1 - in xtTruncate()
3357 xtlck->twm.offset = index; in xtTruncate()
3377 nextindex = index + 1; in xtTruncate()
3389 nextindex = index + 1; in xtTruncate()
3474 index = parent->index; in xtTruncate()
3481 if (index < le16_to_cpu(p->header.nextindex) - 1) { in xtTruncate()
3499 xadlock.xdlist = &p->xad[index + 1]; in xtTruncate()
3502 index - 1; in xtTruncate()
3508 p->header.nextindex = cpu_to_le16(index + 1); in xtTruncate()
3517 nfreed += lengthXAD(&p->xad[index]); in xtTruncate()
3557 if (index == XTENTRYSTART) { in xtTruncate()
3625 index--; in xtTruncate()
3643 BT_PUSH(&btstack, bn, index); in xtTruncate()
3646 xad = &p->xad[index]; in xtTruncate()
3710 int index; in xtTruncate_pmap() local
3736 XT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in xtTruncate_pmap()
3760 index = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate_pmap()
3775 xad = &p->xad[index]; in xtTruncate_pmap()
3784 xtlck->hwm.offset = index; in xtTruncate_pmap()
3804 index = parent->index; in xtTruncate_pmap()
3809 if (index == XTENTRYSTART) { in xtTruncate_pmap()
3832 index--; in xtTruncate_pmap()
3843 BT_PUSH(&btstack, bn, index); in xtTruncate_pmap()
3846 xad = &p->xad[index]; in xtTruncate_pmap()