Lines Matching defs:page

69 #include "page.h"
87 * This is called AFTER we have verified that there is room on the page for
110 /* Adjust page info. */
127 bp = (u_int16_t *)bufp->page;
141 char *src = bufp->page + (int)OFFSET(bp);
164 /* Finally adjust the page data */
201 ino = (u_int16_t *)(op = old_bufp->page);
202 np = new_bufp->page;
219 /* Don't switch page */
231 /* Switch page */
241 /* Now clean up the page */
258 * Called when we encounter an overflow or big key/data page during split
263 * The first page might be a page with regular key/data pairs in which case
265 * page or it might be a big key/data pair in which case we need to fix the
277 int copyto, /* First byte on page which contains key/data values. */
278 int moved) /* Number of pairs moved to new page. */
282 u_int16_t *np; /* New page */
292 ino = (u_int16_t *)old_bufp->page;
293 np = (u_int16_t *)new_bufp->page;
294 op = (u_int16_t *)old_bufp->page;
307 op = (u_int16_t *)old_bufp->page;
311 np = (u_int16_t *)new_bufp->page;
315 cino = (char *)bufp->page;
321 * Fix up the old page -- the extra 2 are the fields
333 ino = (u_int16_t *)bufp->page;
353 /* Keep on old page */
361 op = (u_int16_t *)old_bufp->page;
366 /* Move to new page */
374 np = (u_int16_t *)new_bufp->page;
387 * Add the given pair to the page
399 bp = (u_int16_t *)bufp->page;
404 /* This is the last page of a big key/data pair
405 and we need to add another page */
411 bp = (u_int16_t *)bufp->page;
416 /* Try to squeeze key on this page */
425 bp = (u_int16_t *)bufp->page;
430 putpair(bufp->page, key, val);
436 sop = (u_int16_t *)bufp->page;
470 sp = (u_int16_t *)bufp->page;
493 * Since a pair is allocated on a page only if there's room to add
494 * an overflow page, we know that the OVFL information will fit on
495 * the page.
517 int fd, page, size, rsize;
528 page = BUCKET_TO_PAGE(bucket);
530 page = OADDR_TO_PAGE(bucket);
531 if ((rsize = pread(fd, p, size, (off_t)page << hashp->BSHIFT)) == -1)
535 bp[0] = 0; /* We hit the EOF, so initialize a new page */
562 * Write page p to disk
571 int fd, page, size;
597 page = BUCKET_TO_PAGE(bucket);
599 page = OADDR_TO_PAGE(bucket);
600 if ((wsize = pwrite(fd, p, size, (off_t)page << hashp->BSHIFT)) == -1)
612 * Initialize a new bitmap page. Bitmap pages are left in memory
697 #define OVMSG "HASH: Out of overflow pages. Increase page size\n"
710 /* Check if we need to allocate a new bitmap page */
719 * This is tricky. The 1 indicates that you want the new page
722 * the map page, the second is the overflow page we were
758 /* Calculate address of the new overflow page */
776 * it to convert it to a page number.
782 /* Calculate the split number for this page */
796 /* Allocate and return the overflow page */
801 * Mark this overflow page as free.
873 * We have to know that the key will fit, but the last entry on the page is
925 bp = (short *)bufp->page;
931 bp = (short *)bufp->page;