• Home
  • Raw
  • Download

Lines Matching refs:sp

187 static void dtMoveEntry(dtpage_t * sp, int si, dtpage_t * dp,
935 dtpage_t *sp; /* split page */ in dtSplitUp() local
957 sp = DT_PAGE(ip, smp); in dtSplitUp()
975 if (sp->header.flag & BT_ROOT) { in dtSplitUp()
982 n -= DTROOTMAXSLOT - sp->header.freecnt; /* header + entries */ in dtSplitUp()
1017 pxd = &sp->header.self; in dtSplitUp()
1024 if ((n + sp->header.freecnt) <= split->nslot) in dtSplitUp()
1132 lp = sp; in dtSplitUp()
1138 DT_GETPAGE(ip, parent->bn, smp, PSIZE, sp, rc); in dtSplitUp()
1183 if ((sp->header.flag & BT_ROOT && skip > 1) || in dtSplitUp()
1184 sp->header.prev != 0 || skip > 1) { in dtSplitUp()
1232 if (n > sp->header.freecnt) { in dtSplitUp()
1247 rc = (sp->header.flag & BT_ROOT) ? in dtSplitUp()
1276 if (!(sp->header.flag & BT_ROOT)) { in dtSplitUp()
1279 lv->offset = sp->header.stblindex + n; in dtSplitUp()
1281 ((sp->header.nextindex - in dtSplitUp()
1286 dtInsertEntry(sp, skip, &key, data, &dtlck); in dtSplitUp()
1335 dtpage_t *sp; in dtSplitPage() local
1358 sp = DT_PAGE(ip, smp); in dtSplitPage()
1409 nextbn = le64_to_cpu(sp->header.next); in dtSplitPage()
1411 rp->header.prev = cpu_to_le64(addressPXD(&sp->header.self)); in dtSplitPage()
1412 sp->header.next = cpu_to_le64(rbn); in dtSplitPage()
1417 rp->header.flag = sp->header.flag; in dtSplitPage()
1445 if (nextbn == 0 && split->index == sp->header.nextindex) { in dtSplitPage()
1513 stbl = (u8 *) & sp->slot[sp->header.stblindex]; in dtSplitPage()
1514 nextindex = sp->header.nextindex; in dtSplitPage()
1521 switch (sp->header.flag & BT_TYPE) { in dtSplitPage()
1523 ldtentry = (struct ldtentry *) & sp->slot[si]; in dtSplitPage()
1532 idtentry = (struct idtentry *) & sp->slot[si]; in dtSplitPage()
1564 dtMoveEntry(sp, nxt, rp, &sdtlck, &rdtlck, DO_INDEX(ip)); in dtSplitPage()
1566 sp->header.nextindex = nxt; in dtSplitPage()
1599 dtInsertEntry(sp, skip, split->key, split->data, &sdtlck); in dtSplitPage()
1606 slv->offset = sp->header.stblindex + n; in dtSplitPage()
1608 ((sp->header.nextindex - 1) >> L2DTSLOTSIZE) - n + 1; in dtSplitPage()
1647 dtpage_t *sp, *pp; in dtExtendPage() local
1668 sp = DT_PAGE(ip, smp); in dtExtendPage()
1684 tpxd = &sp->header.self; in dtExtendPage()
1698 pxdlock->pxd = sp->header.self; in dtExtendPage()
1708 stbl = DT_GETSTBL(sp); in dtExtendPage()
1709 for (n = 0; n < sp->header.nextindex; n++) { in dtExtendPage()
1711 (struct ldtentry *) & sp->slot[stbl[n]]; in dtExtendPage()
1724 sp->header.self = *pxd; in dtExtendPage()
1726 jfs_info("dtExtendPage: ip:0x%p smp:0x%p sp:0x%p", ip, smp, sp); in dtExtendPage()
1743 oldstblindex = sp->header.stblindex; in dtExtendPage()
1744 oldstblsize = (sp->header.maxslot + 31) >> L2DTSLOTSIZE; in dtExtendPage()
1745 newstblindex = sp->header.maxslot; in dtExtendPage()
1748 memcpy(&sp->slot[newstblindex], &sp->slot[oldstblindex], in dtExtendPage()
1749 sp->header.nextindex); in dtExtendPage()
1770 lv->length = sp->header.maxslot + newstblsize; in dtExtendPage()
1775 sp->header.maxslot = n; in dtExtendPage()
1776 sp->header.stblindex = newstblindex; in dtExtendPage()
1783 f = &sp->slot[fsi]; in dtExtendPage()
1784 last = sp->header.freelist; in dtExtendPage()
1789 sp->header.freelist = last; in dtExtendPage()
1790 sp->header.freecnt += oldstblsize; in dtExtendPage()
1797 f = &sp->slot[fsi]; in dtExtendPage()
1798 for (fsi++; fsi < sp->header.maxslot; f++, fsi++) in dtExtendPage()
1803 fsi = sp->header.freelist; in dtExtendPage()
1805 sp->header.freelist = n; in dtExtendPage()
1808 f = &sp->slot[fsi]; in dtExtendPage()
1815 sp->header.freecnt += sp->header.maxslot - n; in dtExtendPage()
1820 dtInsertEntry(sp, split->index, split->key, split->data, &dtlck); in dtExtendPage()
1827 n = sp->header.maxslot >> 2; in dtExtendPage()
1828 if (sp->header.freelist < n) in dtExtendPage()
1829 dtLinelockFreelist(sp, n, &dtlck); in dtExtendPage()
1879 dtroot_t *sp; in dtSplitRoot() local
1898 sp = &JFS_IP(ip)->i_dtroot; in dtSplitRoot()
1932 (sp->header.flag & BT_LEAF) ? BT_LEAF : BT_INTERNAL; in dtSplitRoot()
1956 memcpy(stbl, sp->header.stbl, sp->header.nextindex); in dtSplitRoot()
1957 rp->header.nextindex = sp->header.nextindex; in dtSplitRoot()
1960 memcpy(&rp->slot[1], &sp->slot[1], IDATASIZE); in dtSplitRoot()
1973 fsi = sp->header.freelist; in dtSplitRoot()
1987 rp->header.freecnt = sp->header.freecnt + rp->header.maxslot - n; in dtSplitRoot()
2036 if (sp->header.flag & BT_LEAF) { in dtSplitRoot()
2037 sp->header.flag &= ~BT_LEAF; in dtSplitRoot()
2038 sp->header.flag |= BT_INTERNAL; in dtSplitRoot()
2042 s = (struct idtentry *) & sp->slot[DTENTRYSTART]; in dtSplitRoot()
2048 stbl = sp->header.stbl; in dtSplitRoot()
2050 sp->header.nextindex = 1; in dtSplitRoot()
2054 f = &sp->slot[fsi]; in dtSplitRoot()
2061 sp->header.freelist = DTENTRYSTART + 1; in dtSplitRoot()
2062 sp->header.freecnt = DTROOTMAXSLOT - (DTENTRYSTART + 1); in dtSplitRoot()
4053 static void dtMoveEntry(dtpage_t * sp, int si, dtpage_t * dp, in dtMoveEntry() argument
4070 sstbl = (s8 *) & sp->slot[sp->header.stblindex]; in dtMoveEntry()
4074 sfsi = sp->header.freelist; in dtMoveEntry()
4089 for (di = 0; si < sp->header.nextindex; si++, di++) { in dtMoveEntry()
4118 s = &sp->slot[ssi]; in dtMoveEntry()
4119 if (sp->header.flag & BT_LEAF) { in dtMoveEntry()
4186 s = &sp->slot[ssi]; in dtMoveEntry()
4232 sp->header.freelist = sfsi; in dtMoveEntry()
4233 sp->header.freecnt += nd; in dtMoveEntry()