Go to the source code of this file.
Classes | |
struct | _MULTI_SECTOR_HEADER |
struct | _LFS_WRITE_DATA |
struct | _LFS_WRITE_ENTRY |
struct | _LOG_FILE_INFORMATION |
Defines | |
#define | SEQUENCE_NUMBER_STRIDE (512) |
#define | LFS_DEFAULT_LOG_PAGE_SIZE (0x1000) |
Typedefs | |
typedef USHORT | UPDATE_SEQUENCE_NUMBER |
typedef USHORT * | PUPDATE_SEQUENCE_NUMBER |
typedef _MULTI_SECTOR_HEADER | MULTI_SECTOR_HEADER |
typedef _MULTI_SECTOR_HEADER * | PMULTI_SECTOR_HEADER |
typedef UPDATE_SEQUENCE_NUMBER | UPDATE_SEQUENCE_ARRAY [1] |
typedef UPDATE_SEQUENCE_ARRAY * | PUPDATE_SEQUENCE_ARRAY |
typedef _LFS_WRITE_DATA | LFS_WRITE_DATA |
typedef _LFS_WRITE_DATA * | PLFS_WRITE_DATA |
typedef LARGE_INTEGER | LSN |
typedef LARGE_INTEGER * | PLSN |
typedef enum _LFS_RECORD_TYPE | LFS_RECORD_TYPE |
typedef enum _LFS_RECORD_TYPE * | PLFS_RECORD_TYPE |
typedef enum _LFS_CONTEXT_MODE | LFS_CONTEXT_MODE |
typedef enum _LFS_CONTEXT_MODE * | PLFS_CONTEXT_MODE |
typedef ULONG | TRANSACTION_ID |
typedef ULONG * | PTRANSACTION_ID |
typedef enum _TRANSACTION_STATE | TRANSACTION_STATE |
typedef enum _TRANSACTION_STATE * | PTRANSACTION_STATE |
typedef enum _LFS_INFO | LFS_INFO |
typedef enum _LFS_INFO * | PLFS_INFO |
typedef PVOID | LFS_LOG_HANDLE |
typedef PVOID * | PLFS_LOG_HANDLE |
typedef PVOID | LFS_LOG_CONTEXT |
typedef PVOID * | PLFS_LOG_CONTEXT |
typedef _LFS_WRITE_ENTRY | LFS_WRITE_ENTRY |
typedef _LFS_WRITE_ENTRY * | PLFS_WRITE_ENTRY |
typedef _LOG_FILE_INFORMATION | LOG_FILE_INFORMATION |
typedef _LOG_FILE_INFORMATION * | PLOG_FILE_INFORMATION |
Enumerations | |
enum | _LFS_RECORD_TYPE { LfsClientRecord = 1, LfsClientRestart } |
enum | _LFS_CONTEXT_MODE { LfsContextUndoNext = 1, LfsContextPrevious, LfsContextForward } |
enum | _TRANSACTION_STATE { TransactionUninitialized = 0, TransactionActive, TransactionPrepared, TransactionCommitted } |
enum | _LFS_INFO { LfsUseUsa = 1, LfsPackLog, LfsFixedPageSize } |
Functions | |
BOOLEAN | LfsInitializeLogFileService () |
VOID | LfsInitializeLogFile (IN PFILE_OBJECT LogFile, IN USHORT MaximumClients, IN ULONG LogPageSize OPTIONAL, IN LONGLONG FileSize, OUT PLFS_WRITE_DATA WriteData) |
ULONG | LfsOpenLogFile (IN PFILE_OBJECT LogFile, IN UNICODE_STRING ClientName, IN USHORT MaximumClients, IN ULONG LogPageSize OPTIONAL, IN LONGLONG FileSize, IN OUT PLFS_INFO LfsInfo, OUT PLFS_LOG_HANDLE LogHandle, OUT PLFS_WRITE_DATA WriteData) |
VOID | LfsCloseLogFile (IN LFS_LOG_HANDLE LogHandle) |
VOID | LfsDeleteLogHandle (IN LFS_LOG_HANDLE LogHandle) |
VOID | LfsReadLogFileInformation (IN LFS_LOG_HANDLE LogHandle, IN PLOG_FILE_INFORMATION Buffer, IN OUT PULONG Length) |
BOOLEAN | LfsVerifyLogFile (IN LFS_LOG_HANDLE LogHandle, IN PVOID LogFileHeader, IN ULONG Length) |
NTSTATUS | LfsReadRestartArea (IN LFS_LOG_HANDLE LogHandle, IN OUT PULONG BufferLength, IN PVOID Buffer, OUT PLSN Lsn) |
VOID | LfsWriteRestartArea (IN LFS_LOG_HANDLE LogHandle, IN ULONG BufferLength, IN PVOID Buffer, OUT PLSN Lsn) |
VOID | LfsSetBaseLsn (IN LFS_LOG_HANDLE LogHandle, IN LSN BaseLsn) |
VOID | LfsResetUndoTotal (IN LFS_LOG_HANDLE LogHandle, IN ULONG NumberRecords, IN LONG ResetTotal) |
BOOLEAN | LfsWrite (IN LFS_LOG_HANDLE LogHandle, IN ULONG NumberOfWriteEntries, IN PLFS_WRITE_ENTRY WriteEntries, IN LFS_RECORD_TYPE RecordType, IN TRANSACTION_ID *TransactionId OPTIONAL, IN LSN UndoNextLsn, IN LSN PreviousLsn, IN LONG UndoRequirement, OUT PLSN Lsn) |
BOOLEAN | LfsForceWrite (IN LFS_LOG_HANDLE LogHandle, IN ULONG NumberOfWriteEntries, IN PLFS_WRITE_ENTRY WriteEntries, IN LFS_RECORD_TYPE RecordType, IN TRANSACTION_ID *TransactionId OPTIONAL, IN LSN UndoNextLsn, IN LSN PreviousLsn, IN LONG UndoRequirement, OUT PLSN Lsn) |
VOID | LfsFlushToLsn (IN LFS_LOG_HANDLE LogHandle, IN LSN Lsn) |
VOID | LfsCheckWriteRange (IN PLFS_WRITE_DATA WriteData, IN OUT PLONGLONG FlushOffset, IN OUT PULONG FlushLength) |
VOID | LfsReadLogRecord (IN LFS_LOG_HANDLE LogHandle, IN LSN FirstLsn, IN LFS_CONTEXT_MODE ContextMode, OUT PLFS_LOG_CONTEXT Context, OUT PLFS_RECORD_TYPE RecordType, OUT TRANSACTION_ID *TransactionId, OUT PLSN UndoNextLsn, OUT PLSN PreviousLsn, OUT PULONG BufferLength, OUT PVOID *Buffer) |
BOOLEAN | LfsReadNextLogRecord (IN LFS_LOG_HANDLE LogHandle, IN OUT LFS_LOG_CONTEXT Context, OUT PLFS_RECORD_TYPE RecordType, OUT TRANSACTION_ID *TransactionId, OUT PLSN UndoNextLsn, OUT PLSN PreviousLsn, OUT PLSN Lsn, OUT PULONG BufferLength, OUT PVOID *Buffer) |
VOID | LfsTerminateLogQuery (IN LFS_LOG_HANDLE LogHandle, IN LFS_LOG_CONTEXT Context) |
LSN | LfsQueryLastLsn (IN LFS_LOG_HANDLE LogHandle) |
Variables | |
LSN | LfsZeroLsn |
|
Definition at line 153 of file lfs.h. Referenced by LfsInitializeLogFile(), LfsNormalizeBasicLogFile(), and LfsRestartLogFile(). |
|
Definition at line 73 of file lfs.h. Referenced by LfsIsRestartPageHeaderValid(), and LfsReadRestart(). |
|
|
|
|
|
|
|
Definition at line 197 of file lfs.h. Referenced by LfsOpenLogFile(). |
|
|
|
|
|
|
|
|
|
Definition at line 140 of file lfs.h. Referenced by LfsCheckSubsequentLogPage(), LfsFindClientNextLsn(), LfsFindLastLsn(), LfsFlushLbcb(), LfsFlushLfcb(), LfsIsRestartAreaValid(), LfsQueryLastLsn(), LfsRestartLogFile(), LfsSearchForwardByClient(), LfsUpdateLfcbFromNoRestart(), LfsUpdateLfcbFromRestart(), and LfsWriteLogRecordIntoLogPage(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Referenced by LfsWrite(). |
|
|
|
Definition at line 140 of file lfs.h. Referenced by LfsFlushLbcb(), and LfsReadRestart(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 75 of file lfs.h. Referenced by LfsIsRestartPageHeaderValid(), LfsUpdateLfcbFromNoRestart(), and LfsUpdateLfcbFromRestart(). |
|
Definition at line 170 of file lfs.h.
|
|
Definition at line 189 of file lfs.h.
|
|
Definition at line 159 of file lfs.h.
|
|
Definition at line 180 of file lfs.h.
|
|
Definition at line 477 of file lfs/write.c. References _LBCB::FileOffset, LFS_SIGNATURE_RECORD_PAGE_ULONG, NULL, PAGE_SIZE, PAGED_CODE, _LBCB::PageHeader, _LFCB::PageToDirty, and _LFCB::SystemPageSize.
|
|
Definition at line 706 of file lfs/registry.c. References _LBCB::ActiveLinks, Add2Ptr, CcUnpinDataForThread(), ClearFlag, _LFCB::ClientArray, _LCH::ClientArrayByteOffset, _LFS_RESTART_AREA::ClientFreeList, _LCH::ClientId, _LFS_CLIENT_ID::ClientIndex, _LFS_RESTART_AREA::ClientInUseList, _LFS_CLIENT_RECORD::ClientRestartLsn, Dbg, DebugTrace, DebugUnwind, _LFCB_SYNC::Event, Executive, FALSE, FlagOn, _LFCB::Flags, KernelMode, KeWaitForSingleObject(), LBCB_NOT_EMPTY, LBCB_ON_ACTIVE_QUEUE, _LFCB::LbcbActive, _LBCB::LbcbFlags, _LFCB::LbcbWorkque, _LCH::LchLinks, _LCH::Lfcb, LFCB_FINAL_SHUTDOWN, _LFCB::LfcbLinks, LFS_NO_CLIENT, LfsAcquireLch, LfsAcquireLfcb, LfsAcquireLfsData, LfsAddClientToList(), LfsCloseLogFile(), LfsDeallocateLbcb(), LfsDeallocateLfcb(), LfsExceptionFilter(), _LFCB::LfsIoState, LfsLbcbIsRestart, LfsNoIoInProgress, LfsReleaseLch, LfsReleaseLfcb, LfsReleaseLfsData, LfsRemoveClientFromList(), LfsValidateClientId, LfsValidateLch, LfsWriteLfsRestart(), LfsZeroLsn, _LBCB::LogPageBcb, NTSTATUS(), NULL, PAGED_CODE, _LBCB::ResourceThread, _LFCB::RestartArea, _LFCB::RestartAreaSize, _LFS_CLIENT_RECORD::SeqNumber, SetFlag, Status, _LFCB::Sync, TRUE, try_return, USHORT, _LFCB::Waiters, and _LBCB::WorkqueLinks. Referenced by LfsCloseLogFile().
|
|
Definition at line 1063 of file lfs/registry.c. References ExDeleteResource, ExFreePool(), LFS_NTC_LCH, LfsAcquireLch, LfsDeallocateLch, LfsExceptionFilter(), LfsReleaseLch, _LCH::NodeTypeCode, NULL, PAGED_CODE, _LFCB_SYNC::Resource, _LCH::Sync, and _LFCB_SYNC::UserCount.
|
|
Definition at line 360 of file lfs/write.c. References Dbg, DebugTrace, DebugUnwind, ExRaiseStatus(), _LCH::Lfcb, LfsAcquireLch, LfsExceptionFilter(), LfsFlushToLsn(), LfsFlushToLsnPriv(), LfsReleaseLch, LfsValidateClientId, LfsValidateLch, NTSTATUS(), NULL, PAGED_CODE, and Status. Referenced by LfsFlushToLsn().
|
|
Referenced by LfsForceWrite(). |
|
Definition at line 150 of file lfs/registry.c. References Add2Ptr, CcSetAdditionalCacheAttributes(), _LFCB::ClientArray, _LFCB::ClientArrayOffset, Dbg, DebugTrace, DebugUnwind, ExRaiseStatus(), FALSE, _LFCB::FileObject, _LFCB::FirstLogPage, _LFCB::InitialRestartArea, KeQuerySystemTime(), _LFS_DATA::LfcbLinks, _LFCB::LfcbLinks, LFS_DEFAULT_LOG_PAGE_SIZE, LfsAcquireLfcb, LfsAcquireLfsData, LfsAllocateLfcb(), LfsAllocateRestartArea, LfsData, LfsDeallocateLfcb(), LfsDeallocateRestartArea, LfsExceptionFilter(), LfsInitializeLogFile(), LfsInitializeLogFilePriv(), LfsLi0, LfsNormalizeBasicLogFile(), LfsReleaseLfcb, LfsReleaseLfsData, _LFS_WRITE_DATA::LfsStructureSize, LfsUpdateLfcbFromNoRestart(), LfsUpdateLfcbFromPgHeader(), LfsUpdateRestartAreaFromLfcb(), NTSTATUS(), NULL, PAGE_SIZE, PAGED_CODE, _LFCB::RestartArea, _LFCB::RestartDataSize, Status, TRUE, and _LFCB::UserWriteData. Referenced by LfsInitializeLogFile().
|
|
Definition at line 40 of file sysinit.c. References _LFS_DATA::Buffer1, _LFS_DATA::Buffer2, _LFS_DATA::BufferLock, _LFS_DATA::BufferNotification, ClearFlag, Dbg, DebugTrace, ExInitializeFastMutex, FALSE, FlagOn, _LFS_DATA::Flags, KeInitializeEvent, KeQuerySystemTime(), _LFS_DATA::LfcbLinks, LFS_BUFFER_SIZE, LFS_DATA, LFS_DATA_INIT_FAILED, LFS_DATA_INITIALIZED, LFS_NTC_DATA, LfsAllocatePoolNoRaise, LfsData, _LFS_DATA::LfsDataLock, LfsFreePool, LfsUsaSeqNumber, _LFS_DATA::NodeByteSize, _LFS_DATA::NodeTypeCode, NULL, PAGED_CODE, PagedPool, SetFlag, TRUE, and USHORT.
|
|
Definition at line 366 of file lfs/registry.c. References CcSetAdditionalCacheAttributes(), _LFCB::ClientArray, _LCH::ClientArrayByteOffset, _LFS_RESTART_AREA::ClientFreeList, _LCH::ClientId, _LFS_CLIENT_ID::ClientIndex, _LFS_RESTART_AREA::ClientInUseList, _LFS_CLIENT_RECORD::ClientName, _LFS_CLIENT_RECORD::ClientNameLength, _LFS_CLIENT_RECORD::ClientRestartLsn, Dbg, DebugTrace, DebugUnwind, ExRaiseStatus(), _LFCB::FileObject, FlagOn, _LFCB::Flags, _LFCB::LchLinks, _LCH::LchLinks, _LCH::Lfcb, LFCB_LOG_FILE_CORRUPT, LFCB_PACK_LOG, _LFS_DATA::LfcbLinks, _LFCB::LfcbLinks, LFS_CLIENT_NAME_MAX, LFS_LOG_HANDLE, LFS_NO_CLIENT, LfsAcquireLfsData, LfsAddClientToList(), LfsAllocateLch, LfsData, LfsDeallocateLch, LfsDeallocateLfcb(), LfsExceptionFilter(), LfsOpenLogFile(), LfsReleaseLfcb, LfsReleaseLfsData, LfsRemoveClientFromList(), LfsRestartLogFile(), LfsZeroLsn, _LFS_CLIENT_RECORD::NextClient, NTSTATUS(), NULL, _LFS_CLIENT_RECORD::OldestLsn, _LFCB::OldestLsn, PAGED_CODE, PtrOffset, _LFCB::RecordHeaderLength, _LFCB::RestartArea, _LFS_CLIENT_ID::SeqNumber, _LFS_CLIENT_RECORD::SeqNumber, Status, _LCH::Sync, _LFCB::Sync, TRUE, _LFCB_SYNC::UserCount, and USHORT. Referenced by LfsOpenLogFile().
|
|
Definition at line 701 of file querylog.c. References _LFS_RESTART_AREA::CurrentLsn, Dbg, DebugTrace, DebugUnwind, ExRaiseStatus(), FlagOn, _LFCB::Flags, _LCH::Lfcb, LFCB_NO_LAST_LSN, LfsAcquireLch, LfsQueryLastLsn(), LfsReleaseLch, LfsValidateClientId, LfsValidateLch, LfsZeroLsn, LSN, NULL, PAGED_CODE, and _LFCB::RestartArea. Referenced by LfsQueryLastLsn().
|
|
Definition at line 1141 of file lfs/registry.c. References Buffer, _LOG_FILE_INFORMATION::ClientUndoCommitment, _LCH::ClientUndoCommitment, _LOG_FILE_INFORMATION::CurrentAvailable, _LFS_RESTART_AREA::CurrentLsn, Dbg, DebugTrace, DebugUnwind, _LOG_FILE_INFORMATION::LastFlushedLsn, _LFCB::LastFlushedLsn, _LOG_FILE_INFORMATION::LastLsn, _LCH::Lfcb, LfsAcquireLch, LfsCurrentAvailSpace(), LfsReadLogFileInformation(), LfsReleaseLch, LfsValidateClientId, LfsValidateLch, NULL, _LOG_FILE_INFORMATION::OldestLsn, _LFCB::OldestLsn, PAGED_CODE, _LFCB::RestartArea, _LOG_FILE_INFORMATION::TotalAvailable, _LFCB::TotalAvailable, _LOG_FILE_INFORMATION::TotalUndoCommitment, _LFCB::TotalUndoCommitment, and try_return. Referenced by LfsReadLogFileInformation().
|
|
Definition at line 72 of file querylog.c. References Add2Ptr, Buffer, _LFCB::ClientArray, _LCH::ClientArrayByteOffset, _LCH::ClientId, Dbg, DebugTrace, DebugUnwind, ExRaiseStatus(), _LCH::Lfcb, LfsAcquireLch, LfsAllocateLcb(), LfsContextForward, LfsContextPrevious, LfsContextUndoNext, LfsDeallocateLcb(), LfsExceptionFilter(), LfsFindLogRecord(), LfsInitializeLcb, LfsReadLogRecord(), LfsReleaseLch, LfsValidateClientId, LfsValidateLch, LfsVerifyClientLsnInRange, NTSTATUS(), NULL, PAGED_CODE, and Status. Referenced by LfsReadLogRecord().
|
|
Definition at line 299 of file querylog.c. References _LCB::AuxilaryBuffer, Buffer, CcUnpinData(), _LCB::CurrentLogRecord, Dbg, DebugTrace, DebugUnwind, ExRaiseStatus(), FALSE, _LCH::Lfcb, LfsAcquireLch, LfsExceptionFilter(), LfsFindClientNextLsn(), LfsFindLogRecord(), LfsFreeSpanningBuffer(), LfsReadNextLogRecord(), LfsReleaseLch, LfsReleaseLfcb, LfsValidateClientId, LfsValidateLcb, LfsValidateLch, NTSTATUS(), NULL, PAGED_CODE, _LCB::RecordHeader, _LCB::RecordHeaderBcb, Status, and TRUE. Referenced by LfsReadNextLogRecord().
|
|
Definition at line 46 of file restart.c. References Add2Ptr, Buffer, CcUnpinData(), _LFCB::ClientArray, _LCH::ClientArrayByteOffset, _LFS_RECORD_HEADER::ClientDataLength, _LFS_CLIENT_RECORD::ClientRestartLsn, Dbg, DebugTrace, DebugUnwind, ExRaiseStatus(), FALSE, _LCH::Lfcb, LfsAcquireLch, LfsCopyReadLogRecord(), LfsExceptionFilter(), LfsPinOrMapLogRecordHeader(), LfsReadRestartArea(), LfsReleaseLch, LfsReleaseLfcb, LfsValidateClientId, LfsValidateLch, LfsZeroLsn, NTSTATUS(), NULL, PAGED_CODE, Status, _LFS_RECORD_HEADER::ThisLsn, and try_return. Referenced by LfsReadRestartArea().
|
|
Definition at line 1361 of file lfs/registry.c. References _LCH::ClientUndoCommitment, Dbg, DebugTrace, DebugUnwind, ExRaiseStatus(), FlagOn, _LFCB::Flags, _LCH::Lfcb, LFCB_PACK_LOG, LfsAcquireLch, LfsReleaseLch, LfsResetUndoTotal(), LfsValidateClientId, LfsValidateLch, NULL, PAGED_CODE, _LFCB::RecordHeaderLength, and _LFCB::TotalUndoCommitment. Referenced by LfsResetUndoTotal().
|
|
Definition at line 447 of file restart.c. References Add2Ptr, _LFCB::ClientArray, _LCH::ClientArrayByteOffset, Dbg, DebugTrace, DebugUnwind, ExRaiseStatus(), FALSE, _LCH::Lfcb, LfsAcquireLch, LfsExceptionFilter(), LfsReleaseLch, LfsSetBaseLsn(), LfsSetBaseLsnPriv(), LfsValidateClientId, LfsValidateLch, LfsWriteLfsRestart(), NTSTATUS(), NULL, PAGED_CODE, _LFCB::RestartAreaSize, and Status. Referenced by LfsSetBaseLsn().
|
|
Definition at line 594 of file querylog.c. References Dbg, DebugTrace, DebugUnwind, _LCH::Lfcb, LfsAcquireLch, LfsDeallocateLcb(), LfsReleaseLch, LfsTerminateLogQuery(), LfsValidateClientId, LfsValidateLcb, LfsValidateLch, NULL, PAGED_CODE, and try_return. Referenced by LfsTerminateLogQuery().
|
|
Definition at line 1273 of file lfs/registry.c. References Add2Ptr, _LFCB::CurrentOpenLogCount, FALSE, _LCH::Lfcb, LFS_NTC_LCH, LFS_NTC_LFCB, LFS_SIGNATURE_RESTART_PAGE_ULONG, LfsAcquireLch, LfsReleaseLch, LfsReleaseLfcb, _LCH::NodeTypeCode, _LFCB::NodeTypeCode, NULL, PAGED_CODE, _LFS_RESTART_PAGE_HEADER::RestartOffset, _LFCB::SystemPageSize, and TRUE.
|
|
Definition at line 39 of file lfs/write.c. References Dbg, DebugTrace, DebugUnwind, ExRaiseStatus(), FALSE, _LCH::Lfcb, LfsAcquireLch, LfsExceptionFilter(), LfsReleaseLch, LfsValidateClientId, LfsValidateLch, LfsWrite(), LfsWriteLogRecordIntoLogPage(), NTSTATUS(), NULL, PAGED_CODE, PLFS_WRITE_ENTRY, and Status. Referenced by LfsWrite().
|
|
Definition at line 270 of file restart.c. References Add2Ptr, Buffer, _LFS_WRITE_ENTRY::Buffer, _LFS_WRITE_ENTRY::ByteLength, _LFCB::ClientArray, _LCH::ClientArrayByteOffset, _LFS_CLIENT_RECORD::ClientRestartLsn, Dbg, DebugTrace, DebugUnwind, ExRaiseStatus(), _LCH::Lfcb, LfsAcquireLch, LfsClientRestart, LfsExceptionFilter(), LfsReleaseLch, LfsSetBaseLsnPriv(), LfsValidateClientId, LfsValidateLch, LfsWriteLfsRestart(), LfsWriteLogRecordIntoLogPage(), LfsWriteRestartArea(), LfsZeroLsn, NTSTATUS(), NULL, PAGED_CODE, _LFCB::RestartAreaSize, Status, and TRUE. Referenced by LfsWriteRestartArea().
|
|
Definition at line 147 of file lfs.h. Referenced by LfsCloseLogFile(), LfsOpenLogFile(), LfsQueryLastLsn(), LfsReadRestartArea(), and LfsWriteRestartArea(). |