    mp                 78 libdb/mpool.c  	MPOOL *mp;
    mp                 95 libdb/mpool.c  	if ((mp = (MPOOL *)calloc(1, sizeof(MPOOL))) == NULL)
    mp                 97 libdb/mpool.c  	CIRCLEQ_INIT(&mp->lqh);
    mp                 99 libdb/mpool.c  		CIRCLEQ_INIT(&mp->hqh[entry]);
    mp                100 libdb/mpool.c  	mp->maxcache = maxcache;
    mp                101 libdb/mpool.c  	mp->npages = sb.st_size / pagesize;
    mp                102 libdb/mpool.c  	mp->pagesize = pagesize;
    mp                103 libdb/mpool.c  	mp->fd = fd;
    mp                104 libdb/mpool.c  	return (mp);
    mp                112 libdb/mpool.c  mpool_filter(mp, pgin, pgout, pgcookie)
    mp                113 libdb/mpool.c  	MPOOL *mp;
    mp                118 libdb/mpool.c  	mp->pgin = pgin;
    mp                119 libdb/mpool.c  	mp->pgout = pgout;
    mp                120 libdb/mpool.c  	mp->pgcookie = pgcookie;
    mp                128 libdb/mpool.c  mpool_new(mp, pgnoaddr)
    mp                129 libdb/mpool.c  	MPOOL *mp;
    mp                135 libdb/mpool.c  	if (mp->npages == MAX_PAGE_NUMBER) {
    mp                140 libdb/mpool.c  	++mp->pagenew;
    mp                147 libdb/mpool.c  	if ((bp = mpool_bkt(mp)) == NULL)
    mp                149 libdb/mpool.c  	*pgnoaddr = bp->pgno = mp->npages++;
    mp                152 libdb/mpool.c  	head = &mp->hqh[HASHKEY(bp->pgno)];
    mp                154 libdb/mpool.c  	CIRCLEQ_INSERT_TAIL(&mp->lqh, bp, q);
    mp                163 libdb/mpool.c  mpool_get(mp, pgno, flags)
    mp                164 libdb/mpool.c  	MPOOL *mp;
    mp                174 libdb/mpool.c  	if (pgno >= mp->npages) {
    mp                180 libdb/mpool.c  	++mp->pageget;
    mp                184 libdb/mpool.c  	if ((bp = mpool_look(mp, pgno)) != NULL) {
    mp                196 libdb/mpool.c  		head = &mp->hqh[HASHKEY(bp->pgno)];
    mp                199 libdb/mpool.c  		CIRCLEQ_REMOVE(&mp->lqh, bp, q);
    mp                200 libdb/mpool.c  		CIRCLEQ_INSERT_TAIL(&mp->lqh, bp, q);
    mp                208 libdb/mpool.c  	if ((bp = mpool_bkt(mp)) == NULL)
    mp                213 libdb/mpool.c  	++mp->pageread;
    mp                215 libdb/mpool.c  	off = mp->pagesize * pgno;
    mp                216 libdb/mpool.c  	if (lseek(mp->fd, off, SEEK_SET) != off)
    mp                218 libdb/mpool.c  	if ((nr = read(mp->fd, bp->page, mp->pagesize)) != mp->pagesize) {
    mp                232 libdb/mpool.c  	head = &mp->hqh[HASHKEY(bp->pgno)];
    mp                234 libdb/mpool.c  	CIRCLEQ_INSERT_TAIL(&mp->lqh, bp, q);
    mp                237 libdb/mpool.c  	if (mp->pgin != NULL)
    mp                238 libdb/mpool.c  		(mp->pgin)(mp->pgcookie, bp->pgno, bp->page);
    mp                248 libdb/mpool.c  mpool_put(mp, page, flags)
    mp                249 libdb/mpool.c  	MPOOL *mp;
    mp                256 libdb/mpool.c  	++mp->pageput;
    mp                276 libdb/mpool.c  mpool_close(mp)
    mp                277 libdb/mpool.c  	MPOOL *mp;
    mp                282 libdb/mpool.c  	while ((bp = mp->lqh.cqh_first) != (void *)&mp->lqh) {
    mp                283 libdb/mpool.c  		CIRCLEQ_REMOVE(&mp->lqh, mp->lqh.cqh_first, q);
    mp                288 libdb/mpool.c  	free(mp);
    mp                297 libdb/mpool.c  mpool_sync(mp)
    mp                298 libdb/mpool.c  	MPOOL *mp;
    mp                303 libdb/mpool.c  	for (bp = mp->lqh.cqh_first;
    mp                304 libdb/mpool.c  	    bp != (void *)&mp->lqh; bp = bp->q.cqe_next)
    mp                306 libdb/mpool.c  		    mpool_write(mp, bp) == RET_ERROR)
    mp                310 libdb/mpool.c  	return (fsync(mp->fd) ? RET_ERROR : RET_SUCCESS);
    mp                318 libdb/mpool.c  mpool_bkt(mp)
    mp                319 libdb/mpool.c  	MPOOL *mp;
    mp                325 libdb/mpool.c  	if (mp->curcache < mp->maxcache)
    mp                334 libdb/mpool.c  	for (bp = mp->lqh.cqh_first;
    mp                335 libdb/mpool.c  	    bp != (void *)&mp->lqh; bp = bp->q.cqe_next)
    mp                339 libdb/mpool.c  			    mpool_write(mp, bp) == RET_ERROR)
    mp                342 libdb/mpool.c  			++mp->pageflush;
    mp                345 libdb/mpool.c  			head = &mp->hqh[HASHKEY(bp->pgno)];
    mp                347 libdb/mpool.c  			CIRCLEQ_REMOVE(&mp->lqh, bp, q);
    mp                351 libdb/mpool.c  				memset(bp, 0xff, sizeof(BKT) + mp->pagesize);
    mp                358 libdb/mpool.c  new:	if ((bp = (BKT *)malloc(sizeof(BKT) + mp->pagesize)) == NULL)
    mp                361 libdb/mpool.c  	++mp->pagealloc;
    mp                364 libdb/mpool.c  	memset(bp, 0xff, sizeof(BKT) + mp->pagesize);
    mp                367 libdb/mpool.c  	++mp->curcache;
    mp                376 libdb/mpool.c  mpool_write(mp, bp)
    mp                377 libdb/mpool.c  	MPOOL *mp;
    mp                383 libdb/mpool.c  	++mp->pagewrite;
    mp                387 libdb/mpool.c  	if (mp->pgout)
    mp                388 libdb/mpool.c  		(mp->pgout)(mp->pgcookie, bp->pgno, bp->page);
    mp                390 libdb/mpool.c  	off = mp->pagesize * bp->pgno;
    mp                391 libdb/mpool.c  	if (lseek(mp->fd, off, SEEK_SET) != off)
    mp                393 libdb/mpool.c  	if (write(mp->fd, bp->page, mp->pagesize) != mp->pagesize)
    mp                405 libdb/mpool.c  mpool_look(mp, pgno)
    mp                406 libdb/mpool.c  	MPOOL *mp;
    mp                412 libdb/mpool.c  	head = &mp->hqh[HASHKEY(pgno)];
    mp                416 libdb/mpool.c  			++mp->cachehit;
    mp                421 libdb/mpool.c  	++mp->cachemiss;
    mp                432 libdb/mpool.c  mpool_stat(mp)
    mp                433 libdb/mpool.c  	MPOOL *mp;
    mp                439 libdb/mpool.c  	(void)fprintf(stderr, "%lu pages in the file\n", (long unsigned int)mp->npages);
    mp                442 libdb/mpool.c  	    mp->pagesize, (long unsigned int)mp->curcache, (long unsigned int)mp->maxcache);
    mp                444 libdb/mpool.c  	    mp->pageput, mp->pageget, mp->pagenew);
    mp                446 libdb/mpool.c  	    mp->pagealloc, mp->pageflush);
    mp                447 libdb/mpool.c  	if (mp->cachehit + mp->cachemiss)
    mp                450 libdb/mpool.c  		    ((double)mp->cachehit / (mp->cachehit + mp->cachemiss))
    mp                451 libdb/mpool.c  		    * 100, mp->cachehit, mp->cachemiss);
    mp                453 libdb/mpool.c  	    mp->pageread, mp->pagewrite);
    mp                457 libdb/mpool.c  	for (bp = mp->lqh.cqh_first;
    mp                458 libdb/mpool.c  	    bp != (void *)&mp->lqh; bp = bp->q.cqe_next) {