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.

272 lines
5.0 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. rafile.hxx
  5. Abstract:
  6. This module contains the declarations for the
  7. RA_PROCESS_FILE class which handles the read ahead
  8. approach in file verification stage.
  9. Author:
  10. Daniel Chan (danielch) 08-Dec-97
  11. --*/
  12. #if !defined(_RA_PROCESS_FILE_DEFN_)
  13. #define _RA_PROCESS_FILE_DEFN_
  14. #include "supera.hxx"
  15. #include "hmem.hxx"
  16. #include "untfs.hxx"
  17. #include "message.hxx"
  18. #include "ntfsbit.hxx"
  19. #include "numset.hxx"
  20. DECLARE_CLASS( WSTRING );
  21. DECLARE_CLASS( NTFS_ATTRIBUTE );
  22. DECLARE_CLASS( NTFS_FRS_STRUCTURE );
  23. DECLARE_CLASS( NUMBER_SET );
  24. DECLARE_CLASS( NTFS_UPCASE_TABLE );
  25. DECLARE_CLASS( RA_PROCESS_FILE );
  26. DECLARE_CLASS( NTFS_SA );
  27. class RA_PROCESS_FILE : public OBJECT {
  28. public:
  29. UNTFS_EXPORT
  30. DECLARE_CONSTRUCTOR(RA_PROCESS_FILE);
  31. VIRTUAL
  32. UNTFS_EXPORT
  33. ~RA_PROCESS_FILE(
  34. );
  35. STATIC
  36. NONVIRTUAL
  37. UNTFS_EXPORT
  38. BOOLEAN
  39. Initialize(
  40. IN PNTFS_SA Sa,
  41. IN BIG_INT TotalNumberOfFrs,
  42. IN PVCN FirstFrsNumber,
  43. IN PULONG NumberOfFrsToRead,
  44. IN PNTFS_FRS_STRUCTURE FrsStruc1,
  45. IN PNTFS_FRS_STRUCTURE FrsStruc2,
  46. IN PHMEM Hmem1,
  47. IN PHMEM Hmem2,
  48. IN HANDLE ReadAheadEvent,
  49. IN HANDLE ReadReadyEvent,
  50. IN PNTFS_ATTRIBUTE MftData,
  51. IN PNTFS_UPCASE_TABLE UpcaseTable
  52. );
  53. STATIC
  54. NTSTATUS
  55. ProcessFilesWrapper(
  56. IN OUT PVOID lpParameter
  57. );
  58. STATIC
  59. NONVIRTUAL
  60. PNTFS_SA
  61. GetSa(
  62. );
  63. STATIC
  64. NONVIRTUAL
  65. BIG_INT
  66. GetTotalNumberOfFrs(
  67. );
  68. STATIC
  69. NONVIRTUAL
  70. PVCN
  71. GetFirstFrsNumber(
  72. );
  73. STATIC
  74. NONVIRTUAL
  75. PULONG
  76. GetNumberOfFrsToRead(
  77. );
  78. STATIC
  79. NONVIRTUAL
  80. PNTFS_FRS_STRUCTURE
  81. GetFrsStruc1(
  82. );
  83. STATIC
  84. NONVIRTUAL
  85. PNTFS_FRS_STRUCTURE
  86. GetFrsStruc2(
  87. );
  88. STATIC
  89. NONVIRTUAL
  90. PHMEM
  91. GetHmem1(
  92. );
  93. STATIC
  94. NONVIRTUAL
  95. PHMEM
  96. GetHmem2(
  97. );
  98. STATIC
  99. NONVIRTUAL
  100. HANDLE
  101. GetReadAheadEvent(
  102. );
  103. STATIC
  104. NONVIRTUAL
  105. HANDLE
  106. GetReadReadyEvent(
  107. );
  108. STATIC
  109. NONVIRTUAL
  110. PNTFS_ATTRIBUTE
  111. GetMftData(
  112. );
  113. STATIC
  114. NONVIRTUAL
  115. PNTFS_UPCASE_TABLE
  116. GetUpcaseTable(
  117. );
  118. private:
  119. NONVIRTUAL
  120. VOID
  121. Construct (
  122. );
  123. NONVIRTUAL
  124. VOID
  125. Destroy(
  126. );
  127. STATIC PNTFS_SA _sa;
  128. STATIC ULONG64 _total_number_of_frs;
  129. STATIC PVCN _first_frs_number;
  130. STATIC PULONG _number_of_frs_to_read;
  131. STATIC PNTFS_FRS_STRUCTURE _frsstruc1;
  132. STATIC PNTFS_FRS_STRUCTURE _frsstruc2;
  133. STATIC PHMEM _hmem1;
  134. STATIC PHMEM _hmem2;
  135. STATIC HANDLE _read_ahead_event;
  136. STATIC HANDLE _read_ready_event;
  137. STATIC PNTFS_ATTRIBUTE _mft_data;
  138. STATIC PNTFS_UPCASE_TABLE _upcase_table;
  139. };
  140. INLINE
  141. BIG_INT
  142. RA_PROCESS_FILE::GetTotalNumberOfFrs(
  143. )
  144. {
  145. return _total_number_of_frs;
  146. }
  147. INLINE
  148. PVCN
  149. RA_PROCESS_FILE::GetFirstFrsNumber(
  150. )
  151. {
  152. return _first_frs_number;
  153. }
  154. INLINE
  155. PULONG
  156. RA_PROCESS_FILE::GetNumberOfFrsToRead(
  157. )
  158. {
  159. return _number_of_frs_to_read;
  160. }
  161. INLINE
  162. PNTFS_FRS_STRUCTURE
  163. RA_PROCESS_FILE::GetFrsStruc1(
  164. )
  165. {
  166. return _frsstruc1;
  167. }
  168. INLINE
  169. PNTFS_FRS_STRUCTURE
  170. RA_PROCESS_FILE::GetFrsStruc2(
  171. )
  172. {
  173. return _frsstruc2;
  174. }
  175. INLINE
  176. PHMEM
  177. RA_PROCESS_FILE::GetHmem1(
  178. )
  179. {
  180. return _hmem1;
  181. }
  182. INLINE
  183. PHMEM
  184. RA_PROCESS_FILE::GetHmem2(
  185. )
  186. {
  187. return _hmem2;
  188. }
  189. INLINE
  190. HANDLE
  191. RA_PROCESS_FILE::GetReadAheadEvent(
  192. )
  193. {
  194. return _read_ahead_event;
  195. }
  196. INLINE
  197. HANDLE
  198. RA_PROCESS_FILE::GetReadReadyEvent(
  199. )
  200. {
  201. return _read_ready_event;
  202. }
  203. INLINE
  204. PNTFS_SA
  205. RA_PROCESS_FILE::GetSa(
  206. )
  207. {
  208. return _sa;
  209. }
  210. INLINE
  211. PNTFS_ATTRIBUTE
  212. RA_PROCESS_FILE::GetMftData(
  213. )
  214. {
  215. return _mft_data;
  216. }
  217. INLINE
  218. PNTFS_UPCASE_TABLE
  219. RA_PROCESS_FILE::GetUpcaseTable(
  220. )
  221. {
  222. return _upcase_table;
  223. }
  224. #endif // _RA_PROCESS_FILE_DEFN_