Lines Matching refs:dblp
42 log_put(dblp, lsn, dbt, flags)
43 DB_LOG *dblp;
50 LOG_PANIC_CHECK(dblp);
55 return (__db_ferr(dblp->dbenv, "log_put", 0));
57 LOCK_LOGREGION(dblp);
58 ret = __log_put(dblp, lsn, dbt, flags);
59 UNLOCK_LOGREGION(dblp);
70 __log_put(dblp, lsn, dbt, flags)
71 DB_LOG *dblp;
83 lp = dblp->lp;
100 __db_err(dblp->dbenv,
106 if ((ret = __log_flush(dblp, NULL)) != 0)
136 if ((ret = __log_putr(dblp, lsn,
146 if ((ret = __log_putr(dblp, lsn, dbt, lp->lsn.offset - lp->len)) != 0)
158 for (fnp = SH_TAILQ_FIRST(&dblp->lp->fq, __fname);
163 t.data = R_ADDR(dblp, fnp->name_off);
168 if ((ret = __log_register_log(dblp, NULL, &r_unused, 0,
181 if ((ret = __log_flush(dblp, NULL)) != 0)
201 __log_putr(dblp, lsn, dbt, prev)
202 DB_LOG *dblp;
211 lp = dblp->lp;
222 if ((ret = __log_fill(dblp, lsn, &hdr, sizeof(HDR))) != 0)
227 if ((ret = __log_fill(dblp, lsn, dbt->data, dbt->size)) != 0)
239 log_flush(dblp, lsn)
240 DB_LOG *dblp;
245 LOG_PANIC_CHECK(dblp);
247 LOCK_LOGREGION(dblp);
248 ret = __log_flush(dblp, lsn);
249 UNLOCK_LOGREGION(dblp);
259 __log_flush(dblp, lsn)
260 DB_LOG *dblp;
268 lp = dblp->lp;
283 __db_err(dblp->dbenv,
304 if ((ret = __log_write(dblp, lp->buf, lp->b_off)) != 0)
315 if (dblp->lfname != dblp->lp->lsn.file)
316 if ((ret = __log_newfd(dblp)) != 0)
320 if ((ret = __os_fsync(dblp->lfd)) != 0) {
321 __db_panic(dblp->dbenv, ret);
355 __log_fill(dblp, lsn, addr, len)
356 DB_LOG *dblp;
367 for (lp = dblp->lp; len > 0;) {
383 if ((ret = __log_write(dblp,
402 __log_write(dblp, lp->buf, sizeof(lp->buf))) != 0)
415 __log_write(dblp, addr, len)
416 DB_LOG *dblp;
428 lp = dblp->lp;
429 if (dblp->lfd == -1 || dblp->lfname != lp->lsn.file)
430 if ((ret = __log_newfd(dblp)) != 0)
437 if ((ret = __os_seek(dblp->lfd, 0, 0, lp->w_off, 0, SEEK_SET)) != 0 ||
438 (ret = __os_write(dblp->lfd, addr, len, &nw)) != 0) {
439 __db_panic(dblp->dbenv, ret);
467 log_file(dblp, lsn, namep, len)
468 DB_LOG *dblp;
476 LOG_PANIC_CHECK(dblp);
478 LOCK_LOGREGION(dblp);
479 ret = __log_name(dblp, lsn->file, &name, NULL, 0);
480 UNLOCK_LOGREGION(dblp);
500 __log_newfd(dblp)
501 DB_LOG *dblp;
507 if (dblp->lfd != -1) {
508 (void)__os_close(dblp->lfd);
509 dblp->lfd = -1;
513 dblp->lfname = dblp->lp->lsn.file;
514 if ((ret = __log_name(dblp,
515 dblp->lfname, &name, &dblp->lfd, DB_CREATE | DB_SEQUENTIAL)) != 0)
516 __db_err(dblp->dbenv, "log_put: %s: %s", name, strerror(ret));
529 __log_name(dblp, filenumber, namep, fdp, flags)
530 DB_LOG *dblp;
558 if ((ret = __db_appname(dblp->dbenv,
559 DB_APP_LOG, dblp->dir, new, 0, NULL, namep)) != 0 || fdp == NULL)
564 flags, flags, dblp->lp->persist.mode, fdp)) == 0)
576 if ((ret = __db_appname(dblp->dbenv,
577 DB_APP_LOG, dblp->dir, old, 0, NULL, &oname)) != 0)
586 flags, flags, dblp->lp->persist.mode, fdp)) == 0) {