Lines Matching refs:nextindex
58 if ((le16_to_cpu((P)->header.nextindex) < XTENTRYSTART) || \
59 (le16_to_cpu((P)->header.nextindex) > \
269 le16_to_cpu(p->header.nextindex)) { in xtSearch()
285 le16_to_cpu(p->header.nextindex)) { in xtSearch()
326 if (p->header.nextindex == /* little-endian */ in xtSearch()
352 lim = le16_to_cpu(p->header.nextindex) - XTENTRYSTART; in xtSearch()
373 if (p->header.nextindex == in xtSearch()
401 if (index < le16_to_cpu(p->header.nextindex)-1) in xtSearch()
418 if (base < le16_to_cpu(p->header.nextindex)) in xtSearch()
431 if (p->header.nextindex == in xtSearch()
472 if (p->header.nextindex == p->header.maxentry) in xtSearch()
522 int index, nextindex; in xtInsert() local
584 nextindex = le16_to_cpu(p->header.nextindex); in xtInsert()
585 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtInsert()
617 if (index < nextindex) in xtInsert()
619 (nextindex - index) * sizeof(xad_t)); in xtInsert()
626 le16_add_cpu(&p->header.nextindex, 1); in xtInsert()
636 le16_to_cpu(p->header.nextindex) - xtlck->lwm.offset; in xtInsert()
676 int nextindex; /* next available entry index of p */ in xtSplitUp() local
706 nextindex = le16_to_cpu(sp->header.nextindex); in xtSplitUp()
707 if (skip < nextindex) in xtSplitUp()
709 (nextindex - skip) * sizeof(xad_t)); in xtSplitUp()
717 le16_add_cpu(&sp->header.nextindex, 1); in xtSplitUp()
726 le16_to_cpu(sp->header.nextindex) - in xtSplitUp()
825 nextindex = le16_to_cpu(sp->header.nextindex); in xtSplitUp()
829 if (nextindex == le16_to_cpu(sp->header.maxentry)) { in xtSplitUp()
874 if (skip < nextindex) in xtSplitUp()
876 (nextindex - in xtSplitUp()
886 le16_add_cpu(&sp->header.nextindex, 1); in xtSplitUp()
896 le16_to_cpu(sp->header.nextindex) - in xtSplitUp()
991 rp->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtSplitPage()
1043 rp->header.nextindex = cpu_to_le16(XTENTRYSTART + 1); in xtSplitPage()
1115 sp->header.nextindex = cpu_to_le16(middle + 1); in xtSplitPage()
1121 rp->header.nextindex = in xtSplitPage()
1145 sp->header.nextindex = cpu_to_le16(middle); in xtSplitPage()
1151 rp->header.nextindex = cpu_to_le16(XTENTRYSTART + in xtSplitPage()
1156 sxtlck->lwm.length = le16_to_cpu(sp->header.nextindex) - in xtSplitPage()
1160 rxtlck->lwm.length = le16_to_cpu(rp->header.nextindex) - in xtSplitPage()
1208 int skip, nextindex; in xtSplitRoot() local
1251 rp->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtSplitRoot()
1261 nextindex = le16_to_cpu(sp->header.maxentry); in xtSplitRoot()
1263 (nextindex - XTENTRYSTART) << L2XTSLOTSIZE); in xtSplitRoot()
1271 if (skip != nextindex) in xtSplitRoot()
1273 (nextindex - skip) * sizeof(xad_t)); in xtSplitRoot()
1279 rp->header.nextindex = cpu_to_le16(nextindex + 1); in xtSplitRoot()
1285 xtlck->lwm.length = le16_to_cpu(rp->header.nextindex) - in xtSplitRoot()
1310 sp->header.nextindex = cpu_to_le16(XTENTRYSTART + 1); in xtSplitRoot()
1346 int index, nextindex, len; in xtExtend() local
1399 nextindex = le16_to_cpu(p->header.nextindex); in xtExtend()
1407 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtExtend()
1429 ASSERT(p->header.nextindex == in xtExtend()
1456 le16_add_cpu(&p->header.nextindex, 1); in xtExtend()
1476 le16_to_cpu(p->header.nextindex) - xtlck->lwm.offset; in xtExtend()
1505 int index0, index, newindex, nextindex; in xtUpdate() local
1560 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
1600 if (index < nextindex - 1) in xtUpdate()
1602 (nextindex - index - 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()
1637 if (newindex == nextindex) { in xtUpdate()
1670 (nextindex - index - 1) << L2XTSLOTSIZE); in xtUpdate()
1672 p->header.nextindex = in xtUpdate()
1673 cpu_to_le16(le16_to_cpu(p->header.nextindex) - in xtUpdate()
1700 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
1723 ASSERT(p->header.nextindex == in xtUpdate()
1745 le16_to_cpu(p->header.nextindex) + in xtUpdate()
1752 if (newindex < nextindex) in xtUpdate()
1754 (nextindex - newindex) << L2XTSLOTSIZE); 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()
1806 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
1812 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
1851 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
1877 ASSERT(p->header.nextindex == in xtUpdate()
1896 if (newindex < nextindex) in xtUpdate()
1898 (nextindex - newindex) << L2XTSLOTSIZE); 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()
1951 int index, nextindex; in xtAppend() local
2001 nextindex = le16_to_cpu(p->header.nextindex); in xtAppend()
2002 if (nextindex < le16_to_cpu(p->header.maxentry)) in xtAppend()
2077 le16_add_cpu(&p->header.nextindex, 1); in xtAppend()
2081 xtlck->lwm.length = le16_to_cpu(p->header.nextindex) - in xtAppend()
2113 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtInitRoot()
2195 int index, nextindex; in xtTruncate() local
2276 index = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
2326 xtlck->hwm.offset = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
2375 nextindex = index; in xtTruncate()
2416 nextindex = index + 1; in xtTruncate()
2428 nextindex = index + 1; 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()
2436 nextindex; in xtTruncate()
2440 p->header.nextindex = cpu_to_le16(nextindex); in xtTruncate()
2466 le16_to_cpu(p->header.nextindex) - XTENTRYSTART; in xtTruncate()
2473 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtTruncate()
2520 if (index < le16_to_cpu(p->header.nextindex) - 1) { in xtTruncate()
2531 nextindex) - 1; in xtTruncate()
2540 le16_to_cpu(p->header.nextindex) - in xtTruncate()
2547 p->header.nextindex = cpu_to_le16(index + 1); in xtTruncate()
2605 le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
2612 le16_to_cpu(p->header.nextindex) - in xtTruncate()
2622 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtTruncate()
2799 index = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate_pmap()
2855 xtlck->hwm.offset = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate_pmap()