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.

118 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. RawStruc.h
  5. Abstract:
  6. This module defines the data structures that make up the major internal
  7. part of the Raw file system.
  8. Author:
  9. David Goebel [DavidGoe] 18-Mar-91
  10. Revision History:
  11. --*/
  12. #ifndef _RAWSTRUC_
  13. #define _RAWSTRUC_
  14. //
  15. // The Vcb (Volume control Block) record corresponds to every volume mounted
  16. // by the file system. This structure must be allocated from non-paged pool.
  17. //
  18. typedef struct _VCB {
  19. //
  20. // The type and size of this record (must be RAW_NTC_VCB)
  21. //
  22. NODE_TYPE_CODE NodeTypeCode;
  23. NODE_BYTE_SIZE NodeByteSize;
  24. //
  25. // A pointer the device object passed in by the I/O system on a mount
  26. // This is the target device object that the file system talks to when it
  27. // needs to do any I/O (e.g., the disk stripper device object).
  28. //
  29. //
  30. PDEVICE_OBJECT TargetDeviceObject;
  31. //
  32. // A pointer to the VPB for the volume passed in by the I/O system on
  33. // a mount.
  34. //
  35. PVPB Vpb;
  36. //
  37. // A pointer to a spare Vpb used for explicit dismount
  38. //
  39. PVPB SpareVpb;
  40. //
  41. // The internal state of the device.
  42. //
  43. USHORT VcbState;
  44. //
  45. // A mutex to control access to VcbState, OpenCount and ShareAccess
  46. //
  47. KMUTEX Mutex;
  48. //
  49. // A count of the number of file objects that have opened the volume
  50. // and their share access state.
  51. //
  52. CLONG OpenCount;
  53. SHARE_ACCESS ShareAccess;
  54. //
  55. // Information about the disk geometry
  56. //
  57. ULONG BytesPerSector;
  58. LARGE_INTEGER SectorsOnDisk;
  59. } VCB;
  60. typedef VCB *PVCB;
  61. #define VCB_STATE_FLAG_LOCKED (0x0001)
  62. #define VCB_STATE_FLAG_DISMOUNTED (0x0002)
  63. //
  64. // The Volume Device Object is an I/O system device object with a
  65. // VCB record appended to the end. There are multiple of these
  66. // records, one for every mounted volume, and are created during
  67. // a volume mount operation.
  68. //
  69. typedef struct _VOLUME_DEVICE_OBJECT {
  70. DEVICE_OBJECT DeviceObject;
  71. //
  72. // This is the file system specific volume control block.
  73. //
  74. VCB Vcb;
  75. } VOLUME_DEVICE_OBJECT;
  76. typedef VOLUME_DEVICE_OBJECT *PVOLUME_DEVICE_OBJECT;
  77. #endif // _RAWSTRUC_