1N/A * See the file LICENSE for redistribution information. 1N/A * Copyright (c) 1996, 1997, 1998 1N/A * Sleepycat Software. All rights reserved. 1N/A#
define LFNAME "log.%010d" /* Log file name template. */ 1N/A#
define LFNAME_V1 "log.%05d" /* Log file name template, rev 1. */ 1N/A /* Default log name. */ 1N/A/* Check for region catastrophic shutdown. */ 1N/A * The per-process table that maps log file-id's to DB structures. 1N/A int deleted;
/* File was not found during open. */ 1N/A * Per-process log structure. 1N/A/* These fields need to be protected for multi-threaded support. */ 1N/A * These fields are always accessed while the region lock is held, so they do 1N/A * not have to be protected by the thread lock as well OR, they are only used 1N/A * when threads are not being used, i.e. most cursor operations are disallowed 1N/A int lfd;
/* Log file descriptor. */ 1N/A int c_fd;
/* Cursor: file descriptor. */ 1N/A/* These fields are not protected. */ 1N/A LOG *
lp;
/* Address of the shared LOG. */ 1N/A void *
addr;
/* Address of shalloc() region. */ 1N/A char *
dir;
/* Directory argument. */ 1N/A * These fields are used by XA; since XA forbids threaded execution, these 1N/A * do not have to be protected. 1N/A * has to be carried between calls 1N/A for this XA recovery scan. */ 1N/A * Currently used to hold: 1N/A * DB_AM_THREAD (a DB flag) 1N/A * DBC_RECOVER (a DBC flag) 1N/A * If they are ever the same bits, we're in serious trouble. 1N/A * Log record header. 1N/A * Shared log region. One of these is allocated in shared memory, 1N/A * and describes the log. 1N/A * The lsn LSN is the file offset that we're about to write and which 1N/A * we will return to the user. 1N/A * The s_lsn LSN is the last LSN that we know is on disk, not just 1N/A * written, but synced. 1N/A * The f_lsn LSN is the LSN (returned to the user) that "owns" the 1N/A * first byte of the buffer. If the record associated with the LSN 1N/A * spans buffers, it may not reflect the physical file location of 1N/A * the first byte of the buffer.