Lines Matching refs:header

120 	if ((le16_to_cpu(p->header.nextindex) < XTENTRYSTART) ||  in xt_getpage()
121 (le16_to_cpu(p->header.nextindex) > in xt_getpage()
122 le16_to_cpu(p->header.maxentry)) || in xt_getpage()
123 (le16_to_cpu(p->header.maxentry) > in xt_getpage()
282 (p->header.flag & BT_LEAF) && in xtSearch()
284 le16_to_cpu(p->header.nextindex)) { in xtSearch()
300 le16_to_cpu(p->header.nextindex)) { in xtSearch()
341 if (p->header.nextindex == /* little-endian */ in xtSearch()
342 p->header.maxentry) in xtSearch()
367 lim = le16_to_cpu(p->header.nextindex) - XTENTRYSTART; in xtSearch()
383 if (p->header.flag & BT_LEAF) { in xtSearch()
388 if (p->header.nextindex == in xtSearch()
389 p->header.maxentry) in xtSearch()
416 if (index < le16_to_cpu(p->header.nextindex)-1) in xtSearch()
433 if (base < le16_to_cpu(p->header.nextindex)) in xtSearch()
441 if (p->header.flag & BT_LEAF) { in xtSearch()
446 if (p->header.nextindex == in xtSearch()
447 p->header.maxentry) in xtSearch()
487 if (p->header.nextindex == p->header.maxentry) in xtSearch()
599 nextindex = le16_to_cpu(p->header.nextindex); in xtInsert()
600 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtInsert()
641 le16_add_cpu(&p->header.nextindex, 1); in xtInsert()
651 le16_to_cpu(p->header.nextindex) - xtlck->lwm.offset; in xtInsert()
706 if ((sp->header.flag & BT_ROOT) && (!S_ISDIR(ip->i_mode)) && in xtSplitUp()
707 (le16_to_cpu(sp->header.maxentry) < XTROOTMAXSLOT) && in xtSplitUp()
709 sp->header.maxentry = cpu_to_le16(XTROOTMAXSLOT); in xtSplitUp()
721 nextindex = le16_to_cpu(sp->header.nextindex); in xtSplitUp()
732 le16_add_cpu(&sp->header.nextindex, 1); in xtSplitUp()
741 le16_to_cpu(sp->header.nextindex) - in xtSplitUp()
784 rc = (sp->header.flag & BT_ROOT) ? in xtSplitUp()
840 nextindex = le16_to_cpu(sp->header.nextindex); in xtSplitUp()
844 if (nextindex == le16_to_cpu(sp->header.maxentry)) { in xtSplitUp()
860 rc = (sp->header.flag & BT_ROOT) ? in xtSplitUp()
901 le16_add_cpu(&sp->header.nextindex, 1); in xtSplitUp()
911 le16_to_cpu(sp->header.nextindex) - in xtSplitUp()
1003 rp->header.self = *pxd; in xtSplitPage()
1004 rp->header.flag = sp->header.flag & BT_TYPE; in xtSplitPage()
1005 rp->header.maxentry = sp->header.maxentry; /* little-endian */ in xtSplitPage()
1006 rp->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtSplitPage()
1027 nextbn = le64_to_cpu(sp->header.next); in xtSplitPage()
1028 rp->header.next = cpu_to_le64(nextbn); in xtSplitPage()
1029 rp->header.prev = cpu_to_le64(addressPXD(&sp->header.self)); in xtSplitPage()
1030 sp->header.next = cpu_to_le64(rbn); in xtSplitPage()
1047 if (nextbn == 0 && skip == le16_to_cpu(sp->header.maxentry)) { in xtSplitPage()
1058 rp->header.nextindex = cpu_to_le16(XTENTRYSTART + 1); in xtSplitPage()
1095 p->header.prev = cpu_to_le64(rbn); in xtSplitPage()
1107 maxentry = le16_to_cpu(sp->header.maxentry); in xtSplitPage()
1130 sp->header.nextindex = cpu_to_le16(middle + 1); in xtSplitPage()
1136 rp->header.nextindex = in xtSplitPage()
1160 sp->header.nextindex = cpu_to_le16(middle); in xtSplitPage()
1166 rp->header.nextindex = cpu_to_le16(XTENTRYSTART + in xtSplitPage()
1171 sxtlck->lwm.length = le16_to_cpu(sp->header.nextindex) - in xtSplitPage()
1175 rxtlck->lwm.length = le16_to_cpu(rp->header.nextindex) - in xtSplitPage()
1263 rp->header.flag = in xtSplitRoot()
1264 (sp->header.flag & BT_LEAF) ? BT_LEAF : BT_INTERNAL; in xtSplitRoot()
1265 rp->header.self = *pxd; in xtSplitRoot()
1266 rp->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtSplitRoot()
1267 rp->header.maxentry = cpu_to_le16(PSIZE >> L2XTSLOTSIZE); in xtSplitRoot()
1270 rp->header.next = 0; in xtSplitRoot()
1271 rp->header.prev = 0; in xtSplitRoot()
1276 nextindex = le16_to_cpu(sp->header.maxentry); in xtSplitRoot()
1294 rp->header.nextindex = cpu_to_le16(nextindex + 1); in xtSplitRoot()
1300 xtlck->lwm.length = le16_to_cpu(rp->header.nextindex) - in xtSplitRoot()
1322 sp->header.flag &= ~BT_LEAF; in xtSplitRoot()
1323 sp->header.flag |= BT_INTERNAL; in xtSplitRoot()
1325 sp->header.nextindex = cpu_to_le16(XTENTRYSTART + 1); in xtSplitRoot()
1414 nextindex = le16_to_cpu(p->header.nextindex); in xtExtend()
1422 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtExtend()
1443 if (p->header.flag & BT_INTERNAL) { in xtExtend()
1444 ASSERT(p->header.nextindex == in xtExtend()
1471 le16_add_cpu(&p->header.nextindex, 1); in xtExtend()
1491 le16_to_cpu(p->header.nextindex) - xtlck->lwm.offset; in xtExtend()
1575 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
1620 p->header.nextindex = in xtUpdate()
1621 cpu_to_le16(le16_to_cpu(p->header.nextindex) - in xtUpdate()
1626 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
1687 p->header.nextindex = in xtUpdate()
1688 cpu_to_le16(le16_to_cpu(p->header.nextindex) - in xtUpdate()
1715 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
1737 if (p->header.flag & BT_INTERNAL) { in xtUpdate()
1738 ASSERT(p->header.nextindex == in xtUpdate()
1757 (le16_to_cpu(p->header.maxentry) >> 1)) { in xtUpdate()
1760 le16_to_cpu(p->header.nextindex) + in xtUpdate()
1777 p->header.nextindex = in xtUpdate()
1778 cpu_to_le16(le16_to_cpu(p->header.nextindex) + 1); in xtUpdate()
1798 le16_to_cpu(p->header.nextindex) - in xtUpdate()
1802 bn = le64_to_cpu(p->header.next); in xtUpdate()
1821 nextindex = le16_to_cpu(p->header.nextindex); in xtUpdate()
1827 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
1866 if (nextindex == le16_to_cpu(p->header.maxentry)) { in xtUpdate()
1891 if (p->header.flag & BT_INTERNAL) { in xtUpdate()
1892 ASSERT(p->header.nextindex == in xtUpdate()
1920 p->header.nextindex = in xtUpdate()
1921 cpu_to_le16(le16_to_cpu(p->header.nextindex) + 1); in xtUpdate()
1928 xtlck->lwm.length = le16_to_cpu(p->header.nextindex) - in xtUpdate()
2016 nextindex = le16_to_cpu(p->header.nextindex); in xtAppend()
2017 if (nextindex < le16_to_cpu(p->header.maxentry)) in xtAppend()
2092 le16_add_cpu(&p->header.nextindex, 1); in xtAppend()
2096 xtlck->lwm.length = le16_to_cpu(p->header.nextindex) - in xtAppend()
2127 p->header.flag = DXD_INDEX | BT_ROOT | BT_LEAF; in xtInitRoot()
2128 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtInitRoot()
2131 p->header.maxentry = cpu_to_le16(XTROOTINITSLOT_DIR); in xtInitRoot()
2133 p->header.maxentry = cpu_to_le16(XTROOTINITSLOT); in xtInitRoot()
2290 index = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
2297 if (p->header.next) { in xtTruncate()
2306 p->header.next = 0; in xtTruncate()
2309 if (p->header.flag & BT_INTERNAL) in xtTruncate()
2340 xtlck->hwm.offset = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
2445 if (nextindex < le16_to_cpu(p->header.nextindex)) { in xtTruncate()
2449 le16_to_cpu(p->header.nextindex) - in xtTruncate()
2454 p->header.nextindex = cpu_to_le16(nextindex); in xtTruncate()
2480 le16_to_cpu(p->header.nextindex) - XTENTRYSTART; in xtTruncate()
2484 if (p->header.flag & BT_ROOT) { in xtTruncate()
2485 p->header.flag &= ~BT_INTERNAL; in xtTruncate()
2486 p->header.flag |= BT_LEAF; in xtTruncate()
2487 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtTruncate()
2534 if (index < le16_to_cpu(p->header.nextindex) - 1) { in xtTruncate()
2544 le16_to_cpu(p->header. in xtTruncate()
2554 le16_to_cpu(p->header.nextindex) - in xtTruncate()
2561 p->header.nextindex = cpu_to_le16(index + 1); in xtTruncate()
2619 le16_to_cpu(p->header.nextindex) - 1; in xtTruncate()
2626 le16_to_cpu(p->header.nextindex) - in xtTruncate()
2633 if (p->header.flag & BT_ROOT) { in xtTruncate()
2634 p->header.flag &= ~BT_INTERNAL; in xtTruncate()
2635 p->header.flag |= BT_LEAF; in xtTruncate()
2636 p->header.nextindex = cpu_to_le16(XTENTRYSTART); in xtTruncate()
2637 if (le16_to_cpu(p->header.maxentry) == XTROOTMAXSLOT) { in xtTruncate()
2642 p->header.maxentry = in xtTruncate()
2813 index = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate_pmap()
2815 if (p->header.flag & BT_INTERNAL) in xtTruncate_pmap()
2869 xtlck->hwm.offset = le16_to_cpu(p->header.nextindex) - 1; in xtTruncate_pmap()
2874 if (p->header.flag & BT_ROOT) { in xtTruncate_pmap()