Lines Matching refs:dbmp
35 memp_fopen(dbmp, path, flags, mode, pagesize, finfop, retp) in memp_fopen() argument
36 DB_MPOOL *dbmp; in memp_fopen()
46 MP_PANIC_CHECK(dbmp);
49 if ((ret = __db_fchk(dbmp->dbenv,
55 __db_err(dbmp->dbenv, "memp_fopen: pagesize not specified");
61 return (__memp_fopen(dbmp,
73 __memp_fopen(dbmp, mfp, path, flags, mode, pagesize, needlock, finfop, retp) in __memp_fopen() argument
74 DB_MPOOL *dbmp; in __memp_fopen()
93 dbenv = dbmp->dbenv;
124 dbmfp->dbmp = dbmp;
203 LOCKREGION(dbmp);
206 ret = __memp_mf_open(dbmp,
213 F_ISSET(dbmp, MP_LOCKHANDLE) && (ret =
214 __memp_alloc(dbmp, sizeof(db_mutex_t), NULL, &dbmfp->mutexp)) == 0)
215 LOCKINIT(dbmp, dbmfp->mutexp);
218 UNLOCKREGION(dbmp);
273 LOCKHANDLE(dbmp, dbmp->mutexp);
274 TAILQ_INSERT_TAIL(&dbmp->dbmfq, dbmfp, q);
275 UNLOCKHANDLE(dbmp, dbmp->mutexp);
298 __memp_mf_open(dbmp, path, pagesize, last_pgno, finfop, retp) in __memp_mf_open() argument
299 DB_MPOOL *dbmp; in __memp_mf_open()
317 for (mfp = SH_TAILQ_FIRST(&dbmp->mp->mpfq, __mpoolfile);
322 R_ADDR(dbmp, mfp->fileid_off), DB_FILE_ID_LEN)) {
326 __db_err(dbmp->dbenv,
340 if ((ret = __memp_alloc(dbmp, sizeof(MPOOLFILE), NULL, &mfp)) != 0)
363 if ((ret = __memp_alloc(dbmp,
369 if ((ret = __memp_alloc(dbmp,
382 if ((ret = __memp_alloc(dbmp,
390 SH_TAILQ_INSERT_HEAD(&dbmp->mp->mpfq, mfp, q, __mpoolfile);
394 __db_shalloc_free(dbmp->addr,
395 R_ADDR(dbmp, mfp->path_off));
397 __db_shalloc_free(dbmp->addr,
398 R_ADDR(dbmp, mfp->fileid_off));
400 __db_shalloc_free(dbmp->addr, mfp);
414 DB_MPOOL *dbmp; local
417 dbmp = dbmfp->dbmp;
420 MP_PANIC_CHECK(dbmp);
423 LOCKHANDLE(dbmp, dbmp->mutexp);
448 TAILQ_REMOVE(&dbmp->dbmfq, dbmfp, q);
451 UNLOCKHANDLE(dbmp, dbmp->mutexp);
455 UNLOCKHANDLE(dbmp, dbmp->mutexp);
459 __db_err(dbmp->dbenv, "%s: close: %lu blocks left pinned",
463 (void)__memp_mf_close(dbmp, dbmfp);
468 __db_err(dbmp->dbenv,
473 __db_err(dbmp->dbenv,
481 LOCKREGION(dbmp);
482 __db_shalloc_free(dbmp->addr, dbmfp->mutexp);
483 UNLOCKREGION(dbmp);
497 __memp_mf_close(dbmp, dbmfp) in __memp_mf_close() argument
498 DB_MPOOL *dbmp; in __memp_mf_close()
506 mp = dbmp->mp;
509 LOCKREGION(dbmp);
523 mf_offset = R_OFFSET(dbmp, mfp);
530 __db_err(dbmp->dbenv,
541 __memp_bhfree(dbmp, mfp, bhp, 0);
551 __db_shalloc_free(dbmp->addr, R_ADDR(dbmp, mfp->path_off));
553 __db_shalloc_free(dbmp->addr, R_ADDR(dbmp, mfp->fileid_off));
555 __db_shalloc_free(dbmp->addr, R_ADDR(dbmp, mfp->pgcookie_off));
556 __db_shalloc_free(dbmp->addr, mfp);
558 ret1: UNLOCKREGION(dbmp);