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.

129 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. badfile.hxx
  5. Abstract:
  6. This module contains the declarations for the NTFS_BAD_CLUSTER_FILE
  7. class, which models the bad cluster file for an NTFS volume.
  8. The DATA attribute of the bad cluster file is a non-resident
  9. attribute to which bad clusters are allocated. It is stored
  10. as a sparse file with LCN = VCN.
  11. Author:
  12. Bill McJohn (billmc) 18-June-91
  13. Environment:
  14. ULIB, User Mode
  15. --*/
  16. #if !defined( NTFS_BAD_CLUSTER_FILE_DEFN )
  17. #define NTFS_BAD_CLUSTER_FILE_DEFN
  18. #include "frs.hxx"
  19. DECLARE_CLASS( IO_DP_DRIVE );
  20. DECLARE_CLASS( NTFS_ATTRIBUTE);
  21. DECLARE_CLASS( NTFS_MASTER_FILE_TABLE );
  22. DECLARE_CLASS( NTFS_BITMAP );
  23. DECLARE_CLASS( NUMBER_SET );
  24. class NTFS_BAD_CLUSTER_FILE : public NTFS_FILE_RECORD_SEGMENT {
  25. public:
  26. UNTFS_EXPORT
  27. DECLARE_CONSTRUCTOR( NTFS_BAD_CLUSTER_FILE );
  28. UNTFS_EXPORT
  29. VIRTUAL
  30. ~NTFS_BAD_CLUSTER_FILE(
  31. );
  32. UNTFS_EXPORT
  33. NONVIRTUAL
  34. BOOLEAN
  35. Initialize(
  36. IN OUT PNTFS_MASTER_FILE_TABLE Mft
  37. );
  38. NONVIRTUAL
  39. BOOLEAN
  40. Create(
  41. IN PCSTANDARD_INFORMATION StandardInformation,
  42. IN OUT PNTFS_BITMAP Bitmap,
  43. IN PCNUMBER_SET BadClusters
  44. );
  45. NONVIRTUAL
  46. BOOLEAN
  47. VerifyAndFix(
  48. IN OUT PNTFS_BITMAP VolumeBitmap,
  49. IN OUT PNTFS_INDEX_TREE RootIndex,
  50. OUT PBOOLEAN Changes,
  51. IN FIX_LEVEL FixLevel,
  52. IN OUT PMESSAGE Message
  53. );
  54. NONVIRTUAL
  55. BOOLEAN
  56. Add(
  57. IN LCN Lcn
  58. );
  59. NONVIRTUAL
  60. BOOLEAN
  61. Add(
  62. IN PCNUMBER_SET ClustersToAdd
  63. );
  64. NONVIRTUAL
  65. BOOLEAN
  66. AddRun(
  67. IN LCN Lcn,
  68. IN BIG_INT RunLength
  69. );
  70. NONVIRTUAL
  71. BOOLEAN
  72. IsInList(
  73. IN LCN Lcn
  74. );
  75. NONVIRTUAL
  76. BIG_INT
  77. QueryNumBad(
  78. );
  79. NONVIRTUAL
  80. BOOLEAN
  81. Flush(
  82. IN OUT PNTFS_BITMAP Bitmap,
  83. IN OUT PNTFS_INDEX_TREE ParentIndex DEFAULT NULL
  84. );
  85. private:
  86. NONVIRTUAL
  87. VOID
  88. Construct(
  89. );
  90. NONVIRTUAL
  91. VOID
  92. Destroy(
  93. );
  94. PNTFS_ATTRIBUTE _DataAttribute;
  95. };
  96. #endif