Lines Matching refs:nextindex

71 		if ((le16_to_cpu((P)->header.nextindex) < XTENTRYSTART) || \
72 (le16_to_cpu((P)->header.nextindex) > \
293 le16_to_cpu(p->header.nextindex)) { in xtSearch()
309 le16_to_cpu(p->header.nextindex)) { in xtSearch()
350 if (p->header.nextindex == /* little-endian */ in xtSearch()
376 lim = le16_to_cpu(p->header.nextindex) - XTENTRYSTART; in xtSearch()
397 if (p->header.nextindex == in xtSearch()
425 if (index < le16_to_cpu(p->header.nextindex)-1) in xtSearch()
442 if (base < le16_to_cpu(p->header.nextindex)) in xtSearch()
455 if (p->header.nextindex == in xtSearch()
496 if (p->header.nextindex == p->header.maxentry) in xtSearch()
546 int index, nextindex; in xtInsert() local
608 nextindex = le16_to_cpu(p->header.nextindex); in xtInsert()
609 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtInsert()
641 if (index < nextindex) in xtInsert()
643 (nextindex - index) * sizeof(xad_t)); in xtInsert()
650 le16_add_cpu(&p->header.nextindex, 1); in xtInsert()
660 le16_to_cpu(p->header.nextindex) - xtlck->lwm.offset; in xtInsert()
700 int nextindex; /* next available entry index of p */ in xtSplitUp() local
730 nextindex = le16_to_cpu(sp->header.nextindex); in xtSplitUp()
731 if (skip < nextindex) in xtSplitUp()
733 (nextindex - skip) * sizeof(xad_t)); in xtSplitUp()
741 le16_add_cpu(&sp->header.nextindex, 1); in xtSplitUp()
750 le16_to_cpu(sp->header.nextindex) - in xtSplitUp()
849 nextindex = le16_to_cpu(sp->header.nextindex); in xtSplitUp()
853 if (nextindex == le16_to_cpu(sp->header.maxentry)) { in xtSplitUp()
898 if (skip < nextindex) in xtSplitUp()
900 (nextindex - in xtSplitUp()
910 le16_add_cpu(&sp->header.nextindex, 1); in xtSplitUp()
920 le16_to_cpu(sp->header.nextindex) - in xtSplitUp()
1015 rp->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtSplitPage()
1067 rp->header.nextindex = cpu_to_le16(XTENTRYSTART + 1); in xtSplitPage()
1139 sp->header.nextindex = cpu_to_le16(middle + 1); in xtSplitPage()
1145 rp->header.nextindex = in xtSplitPage()
1169 sp->header.nextindex = cpu_to_le16(middle); in xtSplitPage()
1175 rp->header.nextindex = cpu_to_le16(XTENTRYSTART + in xtSplitPage()
1180 sxtlck->lwm.length = le16_to_cpu(sp->header.nextindex) - in xtSplitPage()
1184 rxtlck->lwm.length = le16_to_cpu(rp->header.nextindex) - in xtSplitPage()
1232 int skip, nextindex; in xtSplitRoot() local
1275 rp->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtSplitRoot()
1285 nextindex = le16_to_cpu(sp->header.maxentry); in xtSplitRoot()
1287 (nextindex - XTENTRYSTART) << L2XTSLOTSIZE); in xtSplitRoot()
1295 if (skip != nextindex) in xtSplitRoot()
1297 (nextindex - skip) * sizeof(xad_t)); in xtSplitRoot()
1303 rp->header.nextindex = cpu_to_le16(nextindex + 1); in xtSplitRoot()
1309 xtlck->lwm.length = le16_to_cpu(rp->header.nextindex) - in xtSplitRoot()
1334 sp->header.nextindex = cpu_to_le16(XTENTRYSTART + 1); in xtSplitRoot()
1370 int index, nextindex, len; in xtExtend() local
1423 nextindex = le16_to_cpu(p->header.nextindex); in xtExtend()
1431 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtExtend()
1453 ASSERT(p->header.nextindex == in xtExtend()
1480 le16_add_cpu(&p->header.nextindex, 1); in xtExtend()
1500 le16_to_cpu(p->header.nextindex) - xtlck->lwm.offset; in xtExtend()
1533 int index, nextindex, llen, rlen; in xtTailgate() local
1561 nextindex = le16_to_cpu(p->header.nextindex); in xtTailgate()
1562 if (index != nextindex - 1) { in xtTailgate()
1596 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtTailgate()
1618 ASSERT(p->header.nextindex == in xtTailgate()
1645 le16_add_cpu(&p->header.nextindex, 1); in xtTailgate()
1681 xtlck->lwm.length = le16_to_cpu(p->header.nextindex) - in xtTailgate()
1712 int index0, index, newindex, nextindex; in xtUpdate() local
1767 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
1827 if (index < nextindex - 1) in xtUpdate()
1829 (nextindex - index - in xtUpdate()
1832 p->header.nextindex = in xtUpdate()
1833 cpu_to_le16(le16_to_cpu(p->header.nextindex) - in xtUpdate()
1838 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
1864 if (newindex == nextindex) { in xtUpdate()
1897 (nextindex - index - 1) << L2XTSLOTSIZE); in xtUpdate()
1899 p->header.nextindex = in xtUpdate()
1900 cpu_to_le16(le16_to_cpu(p->header.nextindex) - in xtUpdate()
1928 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
1951 ASSERT(p->header.nextindex == in xtUpdate()
1973 le16_to_cpu(p->header.nextindex) + in xtUpdate()
1980 if (newindex < nextindex) in xtUpdate()
1982 (nextindex - newindex) << L2XTSLOTSIZE); in xtUpdate()
1990 p->header.nextindex = in xtUpdate()
1991 cpu_to_le16(le16_to_cpu(p->header.nextindex) + 1); in xtUpdate()
2011 le16_to_cpu(p->header.nextindex) - in xtUpdate()
2034 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
2040 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
2079 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
2105 ASSERT(p->header.nextindex == in xtUpdate()
2124 if (newindex < nextindex) in xtUpdate()
2126 (nextindex - newindex) << L2XTSLOTSIZE); in xtUpdate()
2133 p->header.nextindex = in xtUpdate()
2134 cpu_to_le16(le16_to_cpu(p->header.nextindex) + 1); in xtUpdate()
2141 xtlck->lwm.length = le16_to_cpu(p->header.nextindex) - in xtUpdate()
2179 int index, nextindex; in xtAppend() local
2229 nextindex = le16_to_cpu(p->header.nextindex); in xtAppend()
2230 if (nextindex < le16_to_cpu(p->header.maxentry)) in xtAppend()
2305 le16_add_cpu(&p->header.nextindex, 1); in xtAppend()
2309 xtlck->lwm.length = le16_to_cpu(p->header.nextindex) - in xtAppend()
2347 int index, nextindex; in xtDelete() local
2367 nextindex = le16_to_cpu(p->header.nextindex); in xtDelete()
2368 le16_add_cpu(&p->header.nextindex, -1); in xtDelete()
2373 if (p->header.nextindex == cpu_to_le16(XTENTRYSTART)) in xtDelete()
2388 if (index < nextindex - 1) in xtDelete()
2390 (nextindex - index - 1) * sizeof(xad_t)); in xtDelete()
2416 int index, nextindex; in xtDeleteUp() local
2430 fp->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtDeleteUp()
2471 nextindex = le16_to_cpu(p->header.nextindex); in xtDeleteUp()
2477 if (nextindex == 1) { in xtDeleteUp()
2482 p->header.nextindex = in xtDeleteUp()
2526 if (index < nextindex - 1) in xtDeleteUp()
2528 (nextindex - index - in xtDeleteUp()
2531 le16_add_cpu(&p->header.nextindex, -1); in xtDeleteUp()
2803 le16_to_cpu(p->header.nextindex) - xtlck->lwm.offset; in xtRelocate()
2863 xtlck->lwm.length = le16_to_cpu(pp->header.nextindex) - in xtRelocate()
2937 lim = le16_to_cpu(p->header.nextindex) - XTENTRYSTART; in xtSearchNode()
3087 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtInitRoot()
3169 int index, nextindex; in xtTruncate() local
3250 index = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
3300 xtlck->hwm.offset = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
3349 nextindex = index; in xtTruncate()
3390 nextindex = index + 1; in xtTruncate()
3402 nextindex = index + 1; in xtTruncate()
3405 if (nextindex < le16_to_cpu(p->header.nextindex)) { in xtTruncate()
3407 xadlock.xdlist = &p->xad[nextindex]; in xtTruncate()
3409 le16_to_cpu(p->header.nextindex) - in xtTruncate()
3410 nextindex; in xtTruncate()
3414 p->header.nextindex = cpu_to_le16(nextindex); in xtTruncate()
3440 le16_to_cpu(p->header.nextindex) - XTENTRYSTART; in xtTruncate()
3447 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtTruncate()
3494 if (index < le16_to_cpu(p->header.nextindex) - 1) { in xtTruncate()
3505 nextindex) - 1; in xtTruncate()
3514 le16_to_cpu(p->header.nextindex) - in xtTruncate()
3521 p->header.nextindex = cpu_to_le16(index + 1); in xtTruncate()
3579 le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
3586 le16_to_cpu(p->header.nextindex) - in xtTruncate()
3596 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtTruncate()
3773 index = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate_pmap()
3829 xtlck->hwm.offset = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate_pmap()