Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

755 lines
20 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. volsnap.h
  5. Abstract:
  6. This file provides the internal data structures for the volume snapshot
  7. driver.
  8. Author:
  9. Norbert P. Kusters (norbertk) 22-Jan-1999
  10. Environment:
  11. kernel mode only
  12. Notes:
  13. Revision History:
  14. --*/
  15. #ifdef POOL_TAGGING
  16. #undef ExAllocatePool
  17. #undef ExAllocatePoolWithQuota
  18. #define ExAllocatePool #assert(FALSE)
  19. #define ExAllocatePoolWithQuota #assert(FALSE)
  20. #endif
  21. #define VOLSNAP_TAG_APP_INFO 'aSoV' // VoSa - Application information allocations
  22. #define VOLSNAP_TAG_BUFFER 'bSoV' // VoSb - Buffer allocations
  23. #define VOLSNAP_TAG_CONTEXT 'cSoV' // VoSc - Snapshot context allocations
  24. #define VOLSNAP_TAG_DIFF_VOLUME 'dSoV' // VoSd - Diff area volume allocations
  25. #define VOLSNAP_TAG_DIFF_FILE 'fSoV' // VoSf - Diff area file allocations
  26. #define VOLSNAP_TAG_BIT_HISTORY 'hSoV' // VoSh - Bit history allocations
  27. #define VOLSNAP_TAG_IO_STATUS 'iSoV' // VoSi - Io status block allocations
  28. #define VOLSNAP_TAG_BITMAP 'mSoV' // VoSm - Bitmap allocations
  29. #define VOLSNAP_TAG_OLD_HEAP 'oSoV' // VoSo - Old heap entry allocations
  30. #define VOLSNAP_TAG_PNP_ID 'pSoV' // VoSp - Pnp id allocations
  31. #define VOLSNAP_TAG_RELATIONS 'rSoV' // VoSr - Device relations allocations
  32. #define VOLSNAP_TAG_SHORT_TERM 'sSoV' // VoSs - Short term allocations
  33. #define VOLSNAP_TAG_TEMP_TABLE 'tSoV' // VoSt - Temp table allocations
  34. #define VOLSNAP_TAG_WORK_QUEUE 'wSoV' // VoSw - Work queue allocations
  35. #define VOLSNAP_TAG_DISPATCH 'xSoV' // VoSx - Dispatch context allocations
  36. #define NUMBER_OF_THREAD_POOLS (3)
  37. struct _VSP_CONTEXT;
  38. typedef struct _VSP_CONTEXT VSP_CONTEXT, *PVSP_CONTEXT;
  39. struct _TEMP_TRANSLATION_TABLE_ENTRY;
  40. typedef struct _TEMP_TRANSLATION_TABLE_ENTRY TEMP_TRANSLATION_TABLE_ENTRY,
  41. *PTEMP_TRANSLATION_TABLE_ENTRY;
  42. typedef struct _DO_EXTENSION {
  43. //
  44. // Pointer to the driver object.
  45. //
  46. PDRIVER_OBJECT DriverObject;
  47. //
  48. // List of volume filters in they system. Protect with 'Semaphore'.
  49. //
  50. LIST_ENTRY FilterList;
  51. //
  52. // HOLD/RELEASE Data. Protect with cancel spin lock.
  53. //
  54. LONG HoldRefCount;
  55. GUID HoldInstanceGuid;
  56. ULONG SecondsToHoldFsTimeout;
  57. ULONG SecondsToHoldIrpTimeout;
  58. LIST_ENTRY HoldIrps;
  59. KTIMER HoldTimer;
  60. KDPC HoldTimerDpc;
  61. //
  62. // A semaphore for synchronization.
  63. //
  64. KSEMAPHORE Semaphore;
  65. //
  66. // Worker Thread. Protect with 'SpinLock'.
  67. // Protect 'WorkerThreadObjects' and 'Wait*' with
  68. // 'ThreadsRefCountSemaphore'.
  69. //
  70. LIST_ENTRY WorkerQueue[NUMBER_OF_THREAD_POOLS];
  71. KSEMAPHORE WorkerSemaphore[NUMBER_OF_THREAD_POOLS];
  72. KSPIN_LOCK SpinLock[NUMBER_OF_THREAD_POOLS];
  73. PVOID* WorkerThreadObjects;
  74. BOOLEAN WaitForWorkerThreadsToExitWorkItemInUse;
  75. WORK_QUEUE_ITEM WaitForWorkerThreadsToExitWorkItem;
  76. //
  77. // The threads ref count. Protect with 'ThreadsRefCountSemaphore'.
  78. //
  79. LONG ThreadsRefCount;
  80. KSEMAPHORE ThreadsRefCountSemaphore;
  81. //
  82. // Notification entry.
  83. //
  84. PVOID NotificationEntry;
  85. //
  86. // Lookaside list for contexts.
  87. //
  88. NPAGED_LOOKASIDE_LIST ContextLookasideList;
  89. //
  90. // Emergency Context. Protect with 'ESpinLock'.
  91. //
  92. PVSP_CONTEXT EmergencyContext;
  93. BOOLEAN EmergencyContextInUse;
  94. LIST_ENTRY IrpWaitingList;
  95. LONG IrpWaitingListNeedsChecking;
  96. KSPIN_LOCK ESpinLock;
  97. //
  98. // Lookaside list for temp table entries.
  99. //
  100. NPAGED_LOOKASIDE_LIST TempTableEntryLookasideList;
  101. //
  102. // Emergency Temp Table Entry. Protect with 'ESpinLock'.
  103. //
  104. PVOID EmergencyTableEntry;
  105. BOOLEAN EmergencyTableEntryInUse;
  106. LIST_ENTRY WorkItemWaitingList;
  107. LONG WorkItemWaitingListNeedsChecking;
  108. //
  109. // Stack count for allocating IRPs. Use InterlockedExchange to update
  110. // along with Root->Semaphore. Then, can be read for use in allocating
  111. // copy irps.
  112. //
  113. LONG StackSize;
  114. //
  115. // Is the code locked? Protect with interlocked and 'Semaphore'.
  116. //
  117. LONG IsCodeLocked;
  118. //
  119. // Copy of registry path input to DriverEntry.
  120. //
  121. UNICODE_STRING RegistryPath;
  122. //
  123. // Queue for AdjustBitmap operations. Just one at at time in the delayed
  124. // work queue. Protect with 'ESpinLock'.
  125. //
  126. LIST_ENTRY AdjustBitmapQueue;
  127. BOOLEAN AdjustBitmapInProgress;
  128. } DO_EXTENSION, *PDO_EXTENSION;
  129. #define DEVICE_EXTENSION_VOLUME (0)
  130. #define DEVICE_EXTENSION_FILTER (1)
  131. struct DEVICE_EXTENSION {
  132. //
  133. // Pointer to the device object for this extension.
  134. //
  135. PDEVICE_OBJECT DeviceObject;
  136. //
  137. // Pointer to the root device extension.
  138. //
  139. PDO_EXTENSION Root;
  140. //
  141. // The type of device extension.
  142. //
  143. ULONG DeviceExtensionType;
  144. //
  145. // A spinlock for synchronization.
  146. //
  147. KSPIN_LOCK SpinLock;
  148. };
  149. typedef DEVICE_EXTENSION* PDEVICE_EXTENSION;
  150. class FILTER_EXTENSION;
  151. typedef FILTER_EXTENSION* PFILTER_EXTENSION;
  152. struct _VSP_DIFF_AREA_FILE;
  153. typedef struct _VSP_DIFF_AREA_FILE VSP_DIFF_AREA_FILE, *PVSP_DIFF_AREA_FILE;
  154. class VOLUME_EXTENSION : public DEVICE_EXTENSION {
  155. public:
  156. //
  157. // A pointer to the filter for the volume that we are snapshotting.
  158. //
  159. PFILTER_EXTENSION Filter;
  160. //
  161. // Local state to handle PNP's START and REMOVE.
  162. // Protect 'IsStarted' with 'InterlockedExchange'.
  163. // Protect 'DeadToPnp' with 'InterlockedExchange'.
  164. // Protect 'DeviceDeleted' with 'InterlockedExchange'.
  165. // Write protect 'IsDead' with 'InterlockedExchange' and
  166. // 'Root->Semaphore.'. 'IsDead' indicates that this device is really
  167. // dead now. It is illegal to turn IsStarted to TRUE.
  168. // Protect 'AliveToPnp' with 'InterlockedExchange'.
  169. //
  170. LONG IsStarted;
  171. LONG DeadToPnp;
  172. LONG DeviceDeleted;
  173. LONG IsDead;
  174. LONG AliveToPnp;
  175. //
  176. // Keep track of all requests outstanding in order to support
  177. // remove.
  178. // Protect 'RefCount' with 'InterlockedIncrement/Decrement'.
  179. // Write protect 'HoldIncomingRequests' with 'SpinLock' and
  180. // 'InterlockedExchange'.
  181. // Protect 'HoldQueue' with 'SpinLock'.
  182. // Protect 'ZeroRefEvent' with the setting of 'HoldIncomingRequests'
  183. // from 0 to 1.
  184. //
  185. LONG RefCount;
  186. LONG HoldIncomingRequests;
  187. LIST_ENTRY HoldIrpQueue;
  188. LIST_ENTRY HoldWorkerQueue;
  189. KEVENT ZeroRefEvent;
  190. //
  191. // Post Commit Processing has occurred. Protect with 'Root->Semaphore'.
  192. // Don't return this device in BusRelations until this is TRUE.
  193. //
  194. BOOLEAN HasEndCommit;
  195. //
  196. // Indicates that this device has been installed. Protect with
  197. // 'Root->Semaphore'.
  198. //
  199. BOOLEAN IsInstalled;
  200. //
  201. // Indicates that growing the diff area file is now safe.
  202. // Protect with 'InterlockedExchange'.
  203. //
  204. LONG OkToGrowDiffArea;
  205. //
  206. // Time stamp when commit took place.
  207. //
  208. LARGE_INTEGER CommitTimeStamp;
  209. //
  210. // A list entry for 'Filter->VolumeList'.
  211. // Write protect with 'Filter->SpinLock', 'Root->Semaphore', and
  212. // 'Filter->RefCount == 0'.
  213. // Blink points to an older snapshot.
  214. // Flink points to a newer snapshot.
  215. //
  216. LIST_ENTRY ListEntry;
  217. //
  218. // The volume number.
  219. //
  220. ULONG VolumeNumber;
  221. //
  222. // A table to translate volume offset to backing store offset.
  223. // Protect with 'PagedResource'.
  224. //
  225. RTL_GENERIC_TABLE VolumeBlockTable;
  226. //
  227. // A table to store entries in flight. This table is non-paged.
  228. // Protect with 'NonPagedResource'.
  229. //
  230. RTL_GENERIC_TABLE TempVolumeBlockTable;
  231. ULONG MaximumNumberOfTempEntries;
  232. ULONG DiffAreaFileIncrease;
  233. //
  234. // A list of Diff Area Files that are used.
  235. // Write protect 'ListOfDiffAreaFiles' with 'NonPagedResource',
  236. // 'Root->Semaphore', 'RefCount == 0', and
  237. // 'extension->Filter->RefCount == 0'.
  238. // Protect 'NextDiffAreaFile' with 'NonPagedResource'.
  239. //
  240. LIST_ENTRY ListOfDiffAreaFiles;
  241. PVSP_DIFF_AREA_FILE NextDiffAreaFile;
  242. //
  243. // Memory mapped section of a diff area file to be used for a heap.
  244. // Protect with 'PagedResource'.
  245. //
  246. PVOID DiffAreaFileMap;
  247. ULONG DiffAreaFileMapSize;
  248. PVOID DiffAreaFileMapProcess;
  249. ULONG NextAvailable;
  250. PVOID NextDiffAreaFileMap;
  251. ULONG NextDiffAreaFileMapSize;
  252. LIST_ENTRY OldHeaps;
  253. //
  254. // A bitmap of blocks that do not need to be copy on writed.
  255. // Protect with 'SpinLock'.
  256. //
  257. PRTL_BITMAP VolumeBlockBitmap;
  258. //
  259. // A bitmap product of ignorable blocks from previous snapshots.
  260. // Protect with 'SpinLock'.
  261. //
  262. PRTL_BITMAP IgnorableProduct;
  263. //
  264. // Application Information. Protect with 'PagedResource'.
  265. //
  266. ULONG ApplicationInformationSize;
  267. PVOID ApplicationInformation;
  268. //
  269. // Volume size.
  270. //
  271. LONGLONG VolumeSize;
  272. //
  273. // Emergency copy irp. Protect with 'SpinLock'.
  274. //
  275. PIRP EmergencyCopyIrp;
  276. LONG EmergencyCopyIrpInUse;
  277. LIST_ENTRY EmergencyCopyIrpQueue;
  278. //
  279. // This field is used to pass a buffer to the TempTableAllocateRoutine.
  280. // Protect with 'NonPagedResource'.
  281. //
  282. PVOID TempTableEntry;
  283. //
  284. // These fields are there to help with the lag in creating new
  285. // page file space. Non paged pool can be used until the page file
  286. // space can be acquired. Protect 'PageFileSpaceCreatePending' and
  287. // 'WaitingForPageFileSpace' with 'SpinLock'.
  288. //
  289. LONG PageFileSpaceCreatePending;
  290. LIST_ENTRY WaitingForPageFileSpace;
  291. };
  292. typedef
  293. VOID
  294. (*ZERO_REF_CALLBACK)(
  295. IN PFILTER_EXTENSION Filter
  296. );
  297. typedef VOLUME_EXTENSION* PVOLUME_EXTENSION;
  298. struct _VSP_CONTEXT {
  299. ULONG Type;
  300. WORK_QUEUE_ITEM WorkItem;
  301. union {
  302. struct {
  303. PVOLUME_EXTENSION Extension;
  304. PIRP OriginalReadIrp;
  305. ULONG_PTR OriginalReadIrpOffset;
  306. LONGLONG OriginalVolumeOffset;
  307. ULONG BlockOffset;
  308. ULONG Length;
  309. PDEVICE_OBJECT TargetObject;
  310. LONGLONG TargetOffset;
  311. } ReadSnapshot;
  312. struct {
  313. PDO_EXTENSION RootExtension;
  314. ULONG QueueNumber;
  315. } ThreadCreation;
  316. struct {
  317. PIO_WORKITEM IoWorkItem;
  318. PIRP Irp;
  319. } Dispatch;
  320. struct {
  321. PVOLUME_EXTENSION Extension;
  322. PIRP Irp;
  323. } Extension;
  324. struct {
  325. PFILTER_EXTENSION Filter;
  326. } Filter;
  327. struct {
  328. PVOLUME_EXTENSION Extension;
  329. PVSP_DIFF_AREA_FILE DiffAreaFile;
  330. } GrowDiffArea;
  331. struct {
  332. KEVENT Event;
  333. } Event;
  334. struct {
  335. PVOLUME_EXTENSION Extension;
  336. PFILTER_EXTENSION DiffAreaFilter;
  337. NTSTATUS SpecificIoStatus;
  338. NTSTATUS FinalStatus;
  339. ULONG UniqueErrorValue;
  340. } ErrorLog;
  341. struct {
  342. PDO_EXTENSION RootExtension;
  343. } RootExtension;
  344. struct {
  345. PVOLUME_EXTENSION Extension;
  346. PIRP Irp;
  347. LONGLONG RoundedStart;
  348. } WriteVolume;
  349. };
  350. };
  351. #define VSP_CONTEXT_TYPE_READ_SNAPSHOT (1)
  352. #define VSP_CONTEXT_TYPE_THREAD_CREATION (2)
  353. #define VSP_CONTEXT_TYPE_DISPATCH (3)
  354. #define VSP_CONTEXT_TYPE_EXTENSION (4)
  355. #define VSP_CONTEXT_TYPE_FILTER (5)
  356. #define VSP_CONTEXT_TYPE_GROW_DIFF_AREA (6)
  357. #define VSP_CONTEXT_TYPE_EVENT (7)
  358. #define VSP_CONTEXT_TYPE_ERROR_LOG (8)
  359. #define VSP_CONTEXT_TYPE_ROOT_EXTENSION (9)
  360. #define VSP_CONTEXT_TYPE_WRITE_VOLUME (10)
  361. class FILTER_EXTENSION : public DEVICE_EXTENSION {
  362. public:
  363. //
  364. // The target object for this filter.
  365. //
  366. PDEVICE_OBJECT TargetObject;
  367. //
  368. // The PDO for this filter.
  369. //
  370. PDEVICE_OBJECT Pdo;
  371. //
  372. // Do we have any snapshots?
  373. // Write protect with 'InterlockedExchange' and 'Root->Semaphore'.
  374. //
  375. LONG SnapshotsPresent;
  376. //
  377. // Keep track of I/Os so that freeze/thaw is possible.
  378. // Protect 'RefCount' with 'InterlockedIncrement/Decrement'.
  379. // Write Protect 'HoldIncomingWrites' with InterlockedExchange and
  380. // 'SpinLock'.
  381. // Protect 'HoldQueue' with 'SpinLock'.
  382. // Protect 'ZeroRefCallback', 'ZeroRefContext',
  383. // and 'TimerIsSet' are for use by the thread that sets
  384. // 'HoldIncomingWrites' to 1 from 0.
  385. // Write protect 'ZeroRefCallback' with 'SpinLock'.
  386. // Protect 'TimerIsSet' with InterlockedExchange.
  387. //
  388. LONG RefCount;
  389. LONG HoldIncomingWrites;
  390. LIST_ENTRY HoldQueue;
  391. ZERO_REF_CALLBACK ZeroRefCallback;
  392. PVOID ZeroRefContext;
  393. KTIMER HoldWritesTimer;
  394. KDPC HoldWritesTimerDpc;
  395. ULONG HoldWritesTimeout;
  396. LONG TimerIsSet;
  397. //
  398. // The flush and hold irp is kept here while it is cancellable.
  399. // Protect with the cancel spin lock.
  400. //
  401. PIRP FlushAndHoldIrp;
  402. //
  403. // This event indicates that the end commit process is completed.
  404. // This means that PNP has kicked into gear and that the ignorable
  405. // bitmap computation has taken place.
  406. //
  407. KEVENT EndCommitProcessCompleted;
  408. //
  409. // Keep a notification entry on this object to watch for a
  410. // dismount. Protect with 'Root->Semaphore'.
  411. //
  412. PVOID TargetDeviceNotificationEntry;
  413. //
  414. // A list entry for 'Root->FilterList'.
  415. // Protect these with 'Root->Semaphore'.
  416. //
  417. LIST_ENTRY ListEntry;
  418. BOOLEAN NotInFilterList;
  419. //
  420. // Keep a list of snapshot volumes.
  421. // Write protect with 'Root->Semaphore', 'RefCount == 0', and
  422. // 'SpinLock'.
  423. // Flink points to the oldest snapshot.
  424. // Blink points to the newest snapshot.
  425. //
  426. LIST_ENTRY VolumeList;
  427. //
  428. // Cache the prepared snapshot for committing later.
  429. // Write protect with 'SpinLock' and 'Root->Semaphore'.
  430. //
  431. PVOLUME_EXTENSION PreparedSnapshot;
  432. //
  433. // List of dead snapshot volumes. Protect with 'Root->Semaphore'.
  434. //
  435. LIST_ENTRY DeadVolumeList;
  436. //
  437. // List of volume snapshots which depend on this filter for
  438. // diff area support. This will serve as removal relations.
  439. // Protect with 'Root->Semaphore'.
  440. //
  441. LIST_ENTRY DiffAreaFilesOnThisFilter;
  442. //
  443. // List of volumes that make up the Diff Area for this volume.
  444. // Protect with 'Root->Semaphore'.
  445. //
  446. LIST_ENTRY DiffAreaVolumes;
  447. //
  448. // Diff area sizes information total for all diff area files.
  449. // Protect with 'SpinLock'.
  450. //
  451. LONGLONG UsedVolumeSpace;
  452. LONGLONG AllocatedVolumeSpace;
  453. LONGLONG MaximumVolumeSpace;
  454. //
  455. // Timer for completing END_COMMIT if device doesn't install.
  456. //
  457. KTIMER EndCommitTimer;
  458. KDPC EndCommitTimerDpc;
  459. //
  460. // File object for AUTO_CLEANUP. Protect with cancel spin lock.
  461. //
  462. PFILE_OBJECT AutoCleanupFileObject;
  463. //
  464. // Is a delete all snapshots pending. Protect with
  465. // InterlockedExchange.
  466. //
  467. LONG DestroyAllSnapshotsPending;
  468. VSP_CONTEXT DestroyContext;
  469. //
  470. // Resource to use for protection. Don't page when holding this
  471. // resource. Protect the queueing with 'SpinLock'.
  472. //
  473. LIST_ENTRY NonPagedResourceList;
  474. BOOLEAN NonPagedResourceInUse;
  475. //
  476. // Page resource to use for protection. It is ok to page when
  477. // holding this resource. Protect the queueing with 'SpinLock'.
  478. //
  479. LIST_ENTRY PagedResourceList;
  480. BOOLEAN PagedResourceInUse;
  481. };
  482. #define BLOCK_SIZE (0x4000)
  483. #define BLOCK_SHIFT (14)
  484. #define MINIMUM_TABLE_HEAP_SIZE (0x20000)
  485. #define MEMORY_PRESSURE_CHECK_ALLOC_SIZE (0x40000)
  486. #define NOMINAL_DIFF_AREA_FILE_GROWTH (50*1024*1024)
  487. #define MAXIMUM_DIFF_AREA_FILE_GROWTH (1000*1024*1024)
  488. typedef struct _TRANSLATION_TABLE_ENTRY {
  489. LONGLONG VolumeOffset;
  490. PDEVICE_OBJECT TargetObject;
  491. LONGLONG TargetOffset;
  492. } TRANSLATION_TABLE_ENTRY, *PTRANSLATION_TABLE_ENTRY;
  493. //
  494. // The structure below is used in the non-paged temp table. 'IsComplete' and
  495. // 'WaitingQueue*' are protected with 'extension->SpinLock'.
  496. //
  497. struct _TEMP_TRANSLATION_TABLE_ENTRY {
  498. LONGLONG VolumeOffset;
  499. PVOLUME_EXTENSION Extension;
  500. PIRP WriteIrp;
  501. PIRP CopyIrp;
  502. PDEVICE_OBJECT TargetObject;
  503. LONGLONG TargetOffset;
  504. BOOLEAN IsComplete;
  505. LIST_ENTRY WaitingQueueDpc; // These can run in arbitrary context.
  506. WORK_QUEUE_ITEM WorkItem;
  507. };
  508. //
  509. // Write protect 'VolumeListEntry' with 'NonPagedResource' and
  510. // 'Root->Semaphore'.
  511. // Protect 'FilterListEntry*' with 'Root->Semaphore'.
  512. // Protect 'NextAvailable' with 'NonPagedResource'
  513. // Write Protect 'AllocatedFileSize' with 'NonPagedResource' and
  514. // 'Root->Semaphore'.
  515. // Protect 'UnusedAllocationList' with 'NonPagedResource'.
  516. //
  517. struct _VSP_DIFF_AREA_FILE {
  518. LIST_ENTRY VolumeListEntry;
  519. LIST_ENTRY FilterListEntry;
  520. BOOLEAN FilterListEntryBeingUsed;
  521. PVOLUME_EXTENSION Extension;
  522. PFILTER_EXTENSION Filter;
  523. HANDLE FileHandle;
  524. LONGLONG NextAvailable;
  525. LONGLONG AllocatedFileSize;
  526. LIST_ENTRY UnusedAllocationList;
  527. };
  528. typedef struct _DIFF_AREA_FILE_ALLOCATION {
  529. LIST_ENTRY ListEntry;
  530. LONGLONG Offset;
  531. LONGLONG Length;
  532. } DIFF_AREA_FILE_ALLOCATION, *PDIFF_AREA_FILE_ALLOCATION;
  533. typedef struct _OLD_HEAP_ENTRY {
  534. LIST_ENTRY ListEntry;
  535. PVOID DiffAreaFileMap;
  536. } OLD_HEAP_ENTRY, *POLD_HEAP_ENTRY;
  537. typedef struct _VSP_DIFF_AREA_VOLUME {
  538. LIST_ENTRY ListEntry;
  539. PFILTER_EXTENSION Filter;
  540. } VSP_DIFF_AREA_VOLUME, *PVSP_DIFF_AREA_VOLUME;
  541. //
  542. // {3808876B-C176-4e48-B7AE-04046E6CC752}
  543. // This GUID is used to decorate the names of the diff area files for
  544. // uniqueness. This GUID has been included in the list of files not to be
  545. // backed up by NTBACKUP. If this GUID is changed, or if other GUIDs are
  546. // added, then this change should also be reflected in the NTBACKUP file
  547. // not to be backed up.
  548. //
  549. DEFINE_GUID(VSP_DIFF_AREA_FILE_GUID, 0x3808876b, 0xc176, 0x4e48, 0xb7, 0xae, 0x4, 0x4, 0x6e, 0x6c, 0xc7, 0x52);
  550. #if DBG
  551. //
  552. // Tracing definitions.
  553. //
  554. typedef struct _VSP_TRACE_STRUCTURE {
  555. ULONG EventNumber;
  556. ULONG_PTR Arg1;
  557. ULONG_PTR Arg2;
  558. ULONG_PTR Arg3;
  559. } VSP_TRACE_STRUCTURE, *PVSP_TRACE_STRUCTURE;
  560. PVSP_TRACE_STRUCTURE
  561. VspAllocateTraceStructure(
  562. );
  563. #define VSP_TRACE_IT(A0, A1, A2, A3) \
  564. { PVSP_TRACE_STRUCTURE moo; \
  565. moo = VspAllocateTraceStructure(); \
  566. moo->EventNumber = (A0); \
  567. moo->Arg1 = (ULONG_PTR) (A1); \
  568. moo->Arg2 = (ULONG_PTR) (A2); \
  569. moo->Arg3 = (ULONG_PTR) (A3); }
  570. #else // DBG
  571. #define VSP_TRACE_IT(A0, A1, A2, A3)
  572. #endif // DBG