Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

lfsdata.h

Go to the documentation of this file.
00001 /*++ BUILD Version: 0000 // Increment this if a change has global effects 00002 00003 Copyright (c) 1989 Microsoft Corporation 00004 00005 Module Name: 00006 00007 LfsData.c 00008 00009 Abstract: 00010 00011 This module declares the global data used by the Log File Service. 00012 00013 Author: 00014 00015 Brian Andrew [BrianAn] 20-June-1991 00016 00017 Revision History: 00018 00019 --*/ 00020 00021 #ifndef _LFSDATA_ 00022 #define _LFSDATA_ 00023 00024 // 00025 // The global Lfs data record 00026 // 00027 00028 extern LFS_DATA LfsData; 00029 00030 // 00031 // Various large integer constants. 00032 // 00033 00034 #define LfsMaximumFileSize (0x0000000100000000) 00035 00036 extern LARGE_INTEGER LfsLi0; 00037 extern LARGE_INTEGER LfsLi1; 00038 00039 // 00040 // The following Lsn is used as a starting point in the file. 00041 // 00042 00043 extern LSN LfsStartingLsn; 00044 00045 // 00046 // Turn on pseudo-asserts if NTFS_FREE_ASSERTS is defined. 00047 // 00048 00049 #if !DBG 00050 #ifdef NTFS_FREE_ASSERTS 00051 #undef ASSERT 00052 #undef ASSERTMSG 00053 #define ASSERT(exp) if (!(exp)) { extern BOOLEAN KdDebuggerEnabled; DbgPrint("%s:%d %s\n",__FILE__,__LINE__,#exp); if (KdDebuggerEnabled) { DbgBreakPoint(); } } 00054 #define ASSERTMSG(msg,exp) if (!(exp)) { extern BOOLEAN KdDebuggerEnabled; DbgPrint("%s:%d %s %s\n",__FILE__,__LINE__,msg,#exp); if (KdDebuggerEnabled) { DbgBreakPoint(); } } 00055 #endif 00056 #endif 00057 00058 // 00059 // The global Lfs debug level variable, its values are: 00060 // 00061 // 0x00000000 Always gets printed (used when about to bug check) 00062 // 00063 // 0x00000001 Error conditions 00064 // 0x00000002 Debug hooks 00065 // 0x00000004 Catch exceptions before completing Irp 00066 // 0x00000008 Unwinding during error conditions 00067 // 00068 // 0x00000010 Lfs initialization 00069 // 0x00000020 Lfs query log records 00070 // 0x00000040 Lfs write log records 00071 // 0x00000080 Lfs registry routines 00072 // 00073 // 0x00000100 Lfs worker thread routines 00074 // 0x00000200 00075 // 0x00000400 00076 // 0x00000800 00077 // 00078 // 0x00001000 Log page support routines 00079 // 0x00002000 Lsn support routines 00080 // 0x00004000 Miscellaneous support routines 00081 // 0x00008000 Support routines for cache operations 00082 // 00083 // 0x00010000 Structure support routines 00084 // 0x00020000 Verify/validate support routines 00085 // 0x00040000 Synchronization routines 00086 // 0x00080000 Log buffer support routines 00087 // 00088 // 0x00100000 Support routines for manipulating log records 00089 // 0x00200000 Support routines for manipulation lfs restart areas 00090 // 0x00400000 Support routines for client restart operations 00091 // 0x00800000 00092 // 00093 // 0x01000000 00094 // 0x02000000 00095 // 0x04000000 00096 // 0x08000000 00097 // 00098 // 0x10000000 00099 // 0x20000000 00100 // 0x40000000 00101 // 0x80000000 00102 // 00103 00104 #ifdef LFSDBG 00105 00106 #define DEBUG_TRACE_ERROR (0x00000001) 00107 #define DEBUG_TRACE_DEBUG_HOOKS (0x00000002) 00108 #define DEBUG_TRACE_CATCH_EXCEPTIONS (0x00000004) 00109 #define DEBUG_TRACE_UNWIND (0x00000008) 00110 #define DEBUG_TRACE_INITIALIZATION (0x00000010) 00111 #define DEBUG_TRACE_QUERY (0x00000020) 00112 #define DEBUG_TRACE_WRITE (0x00000040) 00113 #define DEBUG_TRACE_RESTART (0x00000080) 00114 #define DEBUG_TRACE_REGISTRY (0x00000100) 00115 #define DEBUG_TRACE_WORKER (0x00000200) 00116 #define DEBUG_TRACE_0x00000400 (0x00000400) 00117 #define DEBUG_TRACE_0x00000800 (0x00000800) 00118 #define DEBUG_TRACE_LOG_PAGE_SUP (0x00001000) 00119 #define DEBUG_TRACE_LSN_SUP (0x00002000) 00120 #define DEBUG_TRACE_MISC_SUP (0x00004000) 00121 #define DEBUG_TRACE_CACHE_SUP (0x00008000) 00122 #define DEBUG_TRACE_STRUC_SUP (0x00010000) 00123 #define DEBUG_TRACE_VERIFY_SUP (0x00020000) 00124 #define DEBUG_TRACE_SYNCH_SUP (0x00040000) 00125 #define DEBUG_TRACE_LBCB_SUP (0x00080000) 00126 #define DEBUG_TRACE_LOG_RECORD_SUP (0x00100000) 00127 #define DEBUG_TRACE_RESTART_SUP (0x00200000) 00128 #define DEBUG_TRACE_0x00400000 (0x00400000) 00129 #define DEBUG_TRACE_0x00800000 (0x00800000) 00130 #define DEBUG_TRACE_0x01000000 (0x01000000) 00131 #define DEBUG_TRACE_0x02000000 (0x02000000) 00132 #define DEBUG_TRACE_0x04000000 (0x04000000) 00133 #define DEBUG_TRACE_0x08000000 (0x08000000) 00134 #define DEBUG_TRACE_0x10000000 (0x10000000) 00135 #define DEBUG_TRACE_0x20000000 (0x20000000) 00136 #define DEBUG_TRACE_0x40000000 (0x40000000) 00137 #define DEBUG_TRACE_0x80000000 (0x80000000) 00138 00139 extern LONG LfsDebugTraceLevel; 00140 extern LONG LfsDebugTraceIndent; 00141 00142 #define DebugTrace(INDENT,LEVEL,X,Y) { \ 00143 LONG _i; \ 00144 if (((LEVEL) == 0) || (LfsDebugTraceLevel & (LEVEL))) { \ 00145 _i = (ULONG)PsGetCurrentThread(); \ 00146 DbgPrint("%08lx:",_i); \ 00147 if ((INDENT) < 0) { \ 00148 LfsDebugTraceIndent += (INDENT); \ 00149 } \ 00150 if (LfsDebugTraceIndent < 0) { \ 00151 LfsDebugTraceIndent = 0; \ 00152 } \ 00153 for (_i = 0; _i < LfsDebugTraceIndent; _i += 1) { \ 00154 DbgPrint(" "); \ 00155 } \ 00156 DbgPrint(X,Y); \ 00157 if ((INDENT) > 0) { \ 00158 LfsDebugTraceIndent += (INDENT); \ 00159 } \ 00160 } \ 00161 } 00162 00163 #define DebugDump(STR,LEVEL,PTR) { \ 00164 ULONG _i; \ 00165 VOID LfsDump(); \ 00166 if (((LEVEL) == 0) || (LfsDebugTraceLevel & (LEVEL))) { \ 00167 _i = (ULONG)PsGetCurrentThread(); \ 00168 DbgPrint("%08lx:",_i); \ 00169 DbgPrint(STR); \ 00170 if (PTR != NULL) {LfsDump(PTR);} \ 00171 DbgBreakPoint(); \ 00172 } \ 00173 } 00174 00175 #define DebugUnwind(X) { \ 00176 if (AbnormalTermination()) { \ 00177 DebugTrace(0, DEBUG_TRACE_UNWIND, #X ", Abnormal termination.\n", 0); \ 00178 } \ 00179 } 00180 00181 #define DebugDoit(X) {X;} 00182 00183 #else 00184 00185 #define DebugTrace(INDENT,LEVEL,X,Y) {NOTHING;} 00186 #define DebugDump(STR,LEVEL,PTR) {NOTHING;} 00187 #define DebugUnwind(X) {NOTHING;} 00188 #define DebugDoit(X) {NOTHING;} 00189 00190 #endif // LFSDBG 00191 00192 #endif // _LFSDATA_ 00193

Generated on Sat May 15 19:40:38 2004 for test by doxygen 1.3.7