Lines Matching refs:bhp
37 __memp_bhwrite(dbmp, mfp, bhp, restartp, wrotep)
40 BH *bhp;
129 found: ret = __memp_pgwrite(dbmfp, bhp, restartp, wrotep);
147 __memp_pgread(dbmfp, bhp, can_create)
149 BH *bhp;
163 F_SET(bhp, BH_LOCKED | BH_TRASH);
164 LOCKBUFFER(dbmp, bhp);
185 db_io.pgno = bhp->pgno;
186 db_io.buf = bhp->buf;
201 __memp_fn(dbmfp), (u_long)bhp->pgno);
213 memset(bhp->buf + nr, 0, len - nr);
218 memset(bhp->buf + len, 0xdb, pagesize - len);
223 ret = mfp->ftype == 0 ? 0 : __memp_pg(dbmfp, bhp, 1);
226 err: UNLOCKBUFFER(dbmp, bhp);
233 F_CLR(bhp, BH_LOCKED);
235 F_CLR(bhp, BH_TRASH);
257 __memp_pgwrite(dbmfp, bhp, restartp, wrotep)
259 BH *bhp;
288 if (!F_ISSET(bhp, BH_DIRTY)) {
294 LOCKBUFFER(dbmp, bhp);
301 if (!F_ISSET(bhp, BH_DIRTY)) {
302 UNLOCKBUFFER(dbmp, bhp);
309 F_SET(bhp, BH_LOCKED);
317 if (lg_info != NULL || F_ISSET(bhp, BH_WRITE))
318 memcpy(&lsn, bhp->buf + mfp->lsn_off, sizeof(DB_LSN));
333 if ((ret = __memp_pg(dbmfp, bhp, 0)) != 0)
356 db_io.pgno = bhp->pgno;
357 db_io.buf = bhp->buf;
373 UNLOCKBUFFER(dbmp, bhp);
383 F_SET(bhp, BH_CALLPGIN);
384 F_CLR(bhp, BH_DIRTY | BH_LOCKED);
392 if (F_ISSET(bhp, BH_WRITE)) {
393 F_CLR(bhp, BH_WRITE);
434 __memp_fn(dbmfp), fail, (u_long)bhp->pgno);
437 UNLOCKBUFFER(dbmp, bhp);
447 F_SET(bhp, BH_CALLPGIN);
448 F_CLR(bhp, BH_LOCKED);
460 __memp_pg(dbmfp, bhp, is_pgin)
462 BH *bhp;
492 mpreg->pgin(bhp->pgno, bhp->buf, dbtp)) != 0)
496 mpreg->pgout(bhp->pgno, bhp->buf, dbtp)) != 0)
508 __memp_fn(dbmfp), is_pgin ? "pgin" : "pgout", (u_long)bhp->pgno);
519 __memp_bhfree(dbmp, mfp, bhp, free_mem)
522 BH *bhp;
528 off = BUCKET(dbmp->mp, R_OFFSET(dbmp, mfp), bhp->pgno);
529 SH_TAILQ_REMOVE(&dbmp->htab[off], bhp, hq, __bh);
532 SH_TAILQ_REMOVE(&dbmp->mp->bhq, bhp, q, __bh);
539 __db_shalloc_free(dbmp->addr, bhp);