Lines Matching refs:nextindex
72 if ((le16_to_cpu((P)->header.nextindex) < XTENTRYSTART) ||\
73 (le16_to_cpu((P)->header.nextindex) > le16_to_cpu((P)->header.maxentry)) ||\
299 if (index == le16_to_cpu(p->header.nextindex)) { in xtLookupList()
382 if (index == le16_to_cpu(p->header.nextindex) - 1) { in xtLookupList()
443 if (index == le16_to_cpu(p->header.nextindex) - 1) { in xtLookupList()
553 le16_to_cpu(p->header.nextindex)) { in xtSearch()
569 le16_to_cpu(p->header.nextindex)) { in xtSearch()
610 if (p->header.nextindex == /* little-endian */ in xtSearch()
636 lim = le16_to_cpu(p->header.nextindex) - XTENTRYSTART; in xtSearch()
657 if (p->header.nextindex == in xtSearch()
685 if (index < le16_to_cpu(p->header.nextindex)-1) in xtSearch()
702 if (base < le16_to_cpu(p->header.nextindex)) in xtSearch()
715 if (p->header.nextindex == in xtSearch()
756 if (p->header.nextindex == p->header.maxentry) in xtSearch()
806 int index, nextindex; in xtInsert() local
868 nextindex = le16_to_cpu(p->header.nextindex); in xtInsert()
869 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtInsert()
901 if (index < nextindex) in xtInsert()
903 (nextindex - index) * sizeof(xad_t)); in xtInsert()
910 le16_add_cpu(&p->header.nextindex, 1); in xtInsert()
920 le16_to_cpu(p->header.nextindex) - xtlck->lwm.offset; in xtInsert()
960 int nextindex; /* next available entry index of p */ in xtSplitUp() local
990 nextindex = le16_to_cpu(sp->header.nextindex); in xtSplitUp()
991 if (skip < nextindex) in xtSplitUp()
993 (nextindex - skip) * sizeof(xad_t)); in xtSplitUp()
1001 le16_add_cpu(&sp->header.nextindex, 1); in xtSplitUp()
1010 le16_to_cpu(sp->header.nextindex) - in xtSplitUp()
1109 nextindex = le16_to_cpu(sp->header.nextindex); in xtSplitUp()
1113 if (nextindex == le16_to_cpu(sp->header.maxentry)) { in xtSplitUp()
1158 if (skip < nextindex) in xtSplitUp()
1160 (nextindex - in xtSplitUp()
1170 le16_add_cpu(&sp->header.nextindex, 1); in xtSplitUp()
1180 le16_to_cpu(sp->header.nextindex) - in xtSplitUp()
1276 rp->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtSplitPage()
1328 rp->header.nextindex = cpu_to_le16(XTENTRYSTART + 1); in xtSplitPage()
1400 sp->header.nextindex = cpu_to_le16(middle + 1); in xtSplitPage()
1406 rp->header.nextindex = in xtSplitPage()
1430 sp->header.nextindex = cpu_to_le16(middle); in xtSplitPage()
1436 rp->header.nextindex = cpu_to_le16(XTENTRYSTART + in xtSplitPage()
1441 sxtlck->lwm.length = le16_to_cpu(sp->header.nextindex) - in xtSplitPage()
1445 rxtlck->lwm.length = le16_to_cpu(rp->header.nextindex) - in xtSplitPage()
1493 int skip, nextindex; in xtSplitRoot() local
1534 rp->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtSplitRoot()
1544 nextindex = le16_to_cpu(sp->header.maxentry); in xtSplitRoot()
1546 (nextindex - XTENTRYSTART) << L2XTSLOTSIZE); in xtSplitRoot()
1554 if (skip != nextindex) in xtSplitRoot()
1556 (nextindex - skip) * sizeof(xad_t)); in xtSplitRoot()
1562 rp->header.nextindex = cpu_to_le16(nextindex + 1); in xtSplitRoot()
1568 xtlck->lwm.length = le16_to_cpu(rp->header.nextindex) - in xtSplitRoot()
1593 sp->header.nextindex = cpu_to_le16(XTENTRYSTART + 1); in xtSplitRoot()
1629 int index, nextindex, len; in xtExtend() local
1682 nextindex = le16_to_cpu(p->header.nextindex); in xtExtend()
1690 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtExtend()
1712 ASSERT(p->header.nextindex == in xtExtend()
1739 le16_add_cpu(&p->header.nextindex, 1); in xtExtend()
1759 le16_to_cpu(p->header.nextindex) - xtlck->lwm.offset; in xtExtend()
1792 int index, nextindex, llen, rlen; in xtTailgate() local
1820 nextindex = le16_to_cpu(p->header.nextindex); in xtTailgate()
1821 if (index != nextindex - 1) { in xtTailgate()
1856 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtTailgate()
1878 ASSERT(p->header.nextindex == in xtTailgate()
1905 le16_add_cpu(&p->header.nextindex, 1); in xtTailgate()
1941 xtlck->lwm.length = le16_to_cpu(p->header.nextindex) - in xtTailgate()
1972 int index0, index, newindex, nextindex; in xtUpdate() local
2027 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
2087 if (index < nextindex - 1) in xtUpdate()
2089 (nextindex - index - in xtUpdate()
2092 p->header.nextindex = in xtUpdate()
2093 cpu_to_le16(le16_to_cpu(p->header.nextindex) - in xtUpdate()
2098 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
2124 if (newindex == nextindex) { in xtUpdate()
2157 (nextindex - index - 1) << L2XTSLOTSIZE); in xtUpdate()
2159 p->header.nextindex = in xtUpdate()
2160 cpu_to_le16(le16_to_cpu(p->header.nextindex) - in xtUpdate()
2188 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
2211 ASSERT(p->header.nextindex == in xtUpdate()
2233 le16_to_cpu(p->header.nextindex) + in xtUpdate()
2240 if (newindex < nextindex) in xtUpdate()
2242 (nextindex - newindex) << L2XTSLOTSIZE); in xtUpdate()
2250 p->header.nextindex = in xtUpdate()
2251 cpu_to_le16(le16_to_cpu(p->header.nextindex) + 1); in xtUpdate()
2271 le16_to_cpu(p->header.nextindex) - in xtUpdate()
2294 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
2300 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
2340 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
2366 ASSERT(p->header.nextindex == in xtUpdate()
2385 if (newindex < nextindex) in xtUpdate()
2387 (nextindex - newindex) << L2XTSLOTSIZE); in xtUpdate()
2394 p->header.nextindex = in xtUpdate()
2395 cpu_to_le16(le16_to_cpu(p->header.nextindex) + 1); in xtUpdate()
2402 xtlck->lwm.length = le16_to_cpu(p->header.nextindex) - in xtUpdate()
2440 int index, nextindex; in xtAppend() local
2490 nextindex = le16_to_cpu(p->header.nextindex); in xtAppend()
2491 if (nextindex < le16_to_cpu(p->header.maxentry)) in xtAppend()
2566 le16_add_cpu(&p->header.nextindex, 1); in xtAppend()
2570 xtlck->lwm.length = le16_to_cpu(p->header.nextindex) - in xtAppend()
2608 int index, nextindex; in xtDelete() local
2628 nextindex = le16_to_cpu(p->header.nextindex); in xtDelete()
2629 le16_add_cpu(&p->header.nextindex, -1); in xtDelete()
2634 if (p->header.nextindex == cpu_to_le16(XTENTRYSTART)) in xtDelete()
2649 if (index < nextindex - 1) in xtDelete()
2651 (nextindex - index - 1) * sizeof(xad_t)); in xtDelete()
2677 int index, nextindex; in xtDeleteUp() local
2691 fp->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtDeleteUp()
2732 nextindex = le16_to_cpu(p->header.nextindex); in xtDeleteUp()
2738 if (nextindex == 1) { in xtDeleteUp()
2743 p->header.nextindex = in xtDeleteUp()
2787 if (index < nextindex - 1) in xtDeleteUp()
2789 (nextindex - index - in xtDeleteUp()
2792 le16_add_cpu(&p->header.nextindex, -1); in xtDeleteUp()
3064 le16_to_cpu(p->header.nextindex) - xtlck->lwm.offset; in xtRelocate()
3124 xtlck->lwm.length = le16_to_cpu(pp->header.nextindex) - in xtRelocate()
3198 lim = le16_to_cpu(p->header.nextindex) - XTENTRYSTART; in xtSearchNode()
3348 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtInitRoot()
3430 int index, nextindex; in xtTruncate() local
3511 index = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
3561 xtlck->hwm.offset = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
3610 nextindex = index; in xtTruncate()
3651 nextindex = index + 1; in xtTruncate()
3663 nextindex = index + 1; in xtTruncate()
3666 if (nextindex < le16_to_cpu(p->header.nextindex)) { in xtTruncate()
3668 xadlock.xdlist = &p->xad[nextindex]; in xtTruncate()
3670 le16_to_cpu(p->header.nextindex) - in xtTruncate()
3671 nextindex; in xtTruncate()
3675 p->header.nextindex = cpu_to_le16(nextindex); in xtTruncate()
3701 le16_to_cpu(p->header.nextindex) - XTENTRYSTART; in xtTruncate()
3708 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtTruncate()
3755 if (index < le16_to_cpu(p->header.nextindex) - 1) { in xtTruncate()
3766 nextindex) - 1; in xtTruncate()
3775 le16_to_cpu(p->header.nextindex) - in xtTruncate()
3782 p->header.nextindex = cpu_to_le16(index + 1); in xtTruncate()
3840 le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
3847 le16_to_cpu(p->header.nextindex) - in xtTruncate()
3857 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtTruncate()
4035 index = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate_pmap()
4091 xtlck->hwm.offset = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate_pmap()