Leaked source code of windows server 2003
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.

165 lines
3.8 KiB

  1. /*++
  2. Copyright (c) 1992-2001 Microsoft Corporation
  3. Module Name:
  4. logfile.hxx
  5. Abstract:
  6. This module contains the declarations for the NTFS_LOG_FILE
  7. class, which models the log file for an NTFS volume.
  8. The utilities do not pretend to understand the contents of the
  9. log file. They only create it and set its signature.
  10. Author:
  11. Bill McJohn (billmc) 05-May-1992
  12. Environment:
  13. ULIB, User Mode
  14. --*/
  15. #if !defined( NTFS_LOG_FILE_DEFN )
  16. #define NTFS_LOG_FILE_DEFN
  17. #include "frs.hxx"
  18. #include "drive.hxx"
  19. typedef enum LOG_FILE_SIGNATURE_CODE {
  20. LogFileSignatureCreated,
  21. LogFileSignatureChecked
  22. };
  23. // Note that LogFileFillCharacter matches LOG_FILE_SIGNATURE_CREATED;
  24. // this relationship must be maintained.
  25. #define LogFileFillCharacter (CHAR)0xFF
  26. CONST ULONG LogFileSignatureLength = 4;
  27. #define LOG_FILE_SIGNATURE_CREATED "\xFF\xFF\xFF\xFF"
  28. #define LOG_FILE_SIGNATURE_CHECKED "CHKD"
  29. class NTFS_LOG_FILE : public NTFS_FILE_RECORD_SEGMENT {
  30. public:
  31. UNTFS_EXPORT
  32. DECLARE_CONSTRUCTOR( NTFS_LOG_FILE );
  33. VIRTUAL
  34. UNTFS_EXPORT
  35. ~NTFS_LOG_FILE(
  36. );
  37. NONVIRTUAL
  38. UNTFS_EXPORT
  39. BOOLEAN
  40. Initialize(
  41. IN OUT PNTFS_MASTER_FILE_TABLE Mft
  42. );
  43. NONVIRTUAL
  44. BOOLEAN
  45. Create(
  46. IN PCSTANDARD_INFORMATION StandardInformation,
  47. IN LCN NearLcn,
  48. IN ULONG InitialSize OPTIONAL,
  49. IN OUT PNTFS_BITMAP VolumeBitmap
  50. );
  51. NONVIRTUAL
  52. UNTFS_EXPORT
  53. BOOLEAN
  54. CreateDataAttribute(
  55. IN LCN NearLcn,
  56. IN ULONG InitialSize OPTIONAL,
  57. IN OUT PNTFS_BITMAP VolumeBitmap
  58. );
  59. NONVIRTUAL
  60. BOOLEAN
  61. MarkVolumeChecked(
  62. );
  63. NONVIRTUAL
  64. BOOLEAN
  65. MarkVolumeChecked(
  66. BOOLEAN WriteSecondPage,
  67. LSN GreatestLsn
  68. );
  69. NONVIRTUAL
  70. BOOLEAN
  71. Reset(
  72. IN OUT PMESSAGE Message
  73. );
  74. NONVIRTUAL
  75. BOOLEAN
  76. Resize(
  77. IN BIG_INT NewSize,
  78. IN OUT PNTFS_BITMAP VolumeBitmap,
  79. IN BOOLEAN GetWhatYouCan,
  80. OUT PBOOLEAN Changed,
  81. OUT PBOOLEAN LogFileGrew,
  82. IN OUT PMESSAGE Message
  83. );
  84. NONVIRTUAL
  85. BOOLEAN
  86. VerifyAndFix(
  87. IN OUT PNTFS_BITMAP VolumeBitmap,
  88. IN OUT PNTFS_INDEX_TREE RootIndex,
  89. OUT PBOOLEAN Changes,
  90. IN OUT PNTFS_CHKDSK_REPORT ChkdskReport,
  91. IN FIX_LEVEL FixLevel,
  92. IN BOOLEAN Resize,
  93. IN ULONG LogFileSize,
  94. IN OUT PNUMBER_SET BadClusters,
  95. IN OUT PMESSAGE Message
  96. );
  97. NONVIRTUAL
  98. BOOLEAN
  99. EnsureCleanShutdown(
  100. OUT PLSN Lsn
  101. );
  102. STATIC
  103. ULONG
  104. QueryDefaultSize(
  105. IN PCDP_DRIVE Drive,
  106. IN BIG_INT VolumeSectors
  107. );
  108. STATIC
  109. ULONG
  110. QueryMinimumSize(
  111. IN PCDP_DRIVE Drive,
  112. IN BIG_INT VolumeSectors
  113. );
  114. STATIC
  115. ULONG
  116. QueryMaximumSize(
  117. IN PCDP_DRIVE Drive,
  118. IN BIG_INT VolumeSectors
  119. );
  120. private:
  121. NONVIRTUAL
  122. VOID
  123. Construct(
  124. );
  125. };
  126. #endif