Lines Matching refs:page

72 #include "page.h"
90 * This is called AFTER we have verified that there is room on the page for
113 /* Adjust page info. */
130 bp = (u_int16_t *)bufp->page;
144 char *src = bufp->page + (int)OFFSET(bp);
167 /* Finally adjust the page data */
204 ino = (u_int16_t *)(op = old_bufp->page);
205 np = new_bufp->page;
222 /* Don't switch page */
234 /* Switch page */
244 /* Now clean up the page */
261 * Called when we encounter an overflow or big key/data page during split
266 * The first page might be a page with regular key/data pairs in which case
268 * page or it might be a big key/data pair in which case we need to fix the
280 int copyto, /* First byte on page which contains key/data values. */
281 int moved) /* Number of pairs moved to new page. */
285 u_int16_t *np; /* New page */
295 ino = (u_int16_t *)old_bufp->page;
296 np = (u_int16_t *)new_bufp->page;
297 op = (u_int16_t *)old_bufp->page;
310 op = (u_int16_t *)old_bufp->page;
314 np = (u_int16_t *)new_bufp->page;
318 cino = (char *)bufp->page;
324 * Fix up the old page -- the extra 2 are the fields
336 ino = (u_int16_t *)bufp->page;
356 /* Keep on old page */
364 op = (u_int16_t *)old_bufp->page;
369 /* Move to new page */
377 np = (u_int16_t *)new_bufp->page;
390 * Add the given pair to the page
402 bp = (u_int16_t *)bufp->page;
407 /* This is the last page of a big key/data pair
408 and we need to add another page */
414 bp = (u_int16_t *)bufp->page;
419 /* Try to squeeze key on this page */
428 bp = (u_int16_t *)bufp->page;
433 putpair(bufp->page, key, val);
439 sop = (u_int16_t *)bufp->page;
473 sp = (u_int16_t *)bufp->page;
496 * Since a pair is allocated on a page only if there's room to add
497 * an overflow page, we know that the OVFL information will fit on
498 * the page.
520 int fd, page, size, rsize;
531 page = BUCKET_TO_PAGE(bucket);
533 page = OADDR_TO_PAGE(bucket);
534 if ((rsize = pread(fd, p, size, (off_t)page << hashp->BSHIFT)) == -1)
538 bp[0] = 0; /* We hit the EOF, so initialize a new page */
565 * Write page p to disk
574 int fd, page, size, wsize;
595 page = BUCKET_TO_PAGE(bucket);
597 page = OADDR_TO_PAGE(bucket);
598 if ((wsize = pwrite(fd, p, size, (off_t)page << hashp->BSHIFT)) == -1)
610 * Initialize a new bitmap page. Bitmap pages are left in memory
695 #define OVMSG "HASH: Out of overflow pages. Increase page size\n"
708 /* Check if we need to allocate a new bitmap page */
717 * This is tricky. The 1 indicates that you want the new page
720 * the map page, the second is the overflow page we were
756 /* Calculate address of the new overflow page */
774 * it to convert it to a page number.
780 /* Calculate the split number for this page */
794 /* Allocate and return the overflow page */
799 * Mark this overflow page as free.
874 * We have to know that the key will fit, but the last entry on the page is
926 bp = (short *)bufp->page;
932 bp = (short *)bufp->page;