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.

117 lines
4.8 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. clusapi.h
  5. Abstract:
  6. This module defines the common management and application interface to
  7. the Windows Clusters services.
  8. Authors:
  9. Rod Gamache 13-Feb-1996
  10. Revision History:
  11. --*/
  12. #ifndef _CLUSTER_DISK_
  13. #define _CLUSTER_DISK_
  14. //
  15. // Disk States.
  16. //
  17. typedef enum _DiskState {
  18. DiskOffline,
  19. DiskOnline,
  20. DiskFailed,
  21. DiskStalled,
  22. DiskOfflinePending,
  23. DiskStateInvalid,
  24. DiskStateMaximum = DiskStateInvalid
  25. } DiskState;
  26. //
  27. // Define IOCTLs specific to ClusDisk Filter Driver.
  28. //
  29. #define IOCTL_DISK_CLUSTER_SET_STATE CTL_CODE(IOCTL_SCSI_BASE, 0x500, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  30. #define IOCTL_DISK_CLUSTER_ATTACH CTL_CODE(IOCTL_SCSI_BASE, 0x505, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  31. #define IOCTL_DISK_CLUSTER_DETACH CTL_CODE(IOCTL_SCSI_BASE, 0x506, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  32. #define IOCTL_DISK_CLUSTER_START_RESERVE CTL_CODE(IOCTL_SCSI_BASE, 0x508, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  33. #define IOCTL_DISK_CLUSTER_STOP_RESERVE CTL_CODE(IOCTL_SCSI_BASE, 0x509, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  34. #define IOCTL_DISK_CLUSTER_ALIVE_CHECK CTL_CODE(IOCTL_SCSI_BASE, 0x510, METHOD_BUFFERED, FILE_READ_ACCESS)
  35. #define IOCTL_DISK_CLUSTER_ACTIVE CTL_CODE(IOCTL_SCSI_BASE, 0x512, METHOD_BUFFERED, FILE_ANY_ACCESS)
  36. #define IOCTL_DISK_CLUSTER_TEST CTL_CODE(IOCTL_SCSI_BASE, 0x513, METHOD_BUFFERED, FILE_ANY_ACCESS)
  37. #define IOCTL_DISK_CLUSTER_NOT_CLUSTER_CAPABLE CTL_CODE(IOCTL_SCSI_BASE, 0x514, METHOD_BUFFERED, FILE_ANY_ACCESS)
  38. #define IOCTL_DISK_CLUSTER_ARBITRATION_ESCAPE CTL_CODE(IOCTL_SCSI_BASE, 0x516, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
  39. #define IOCTL_DISK_CLUSTER_WAIT_FOR_CLEANUP CTL_CODE(IOCTL_SCSI_BASE, 0x521, METHOD_BUFFERED, FILE_ANY_ACCESS)
  40. #define IOCTL_DISK_CLUSTER_VOLUME_TEST CTL_CODE(IOCTL_SCSI_BASE, 0x522, METHOD_BUFFERED, FILE_ANY_ACCESS)
  41. #define IOCTL_DISK_CLUSTER_ATTACH_LIST CTL_CODE(IOCTL_SCSI_BASE, 0x523, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  42. #define IOCTL_DISK_CLUSTER_DETACH_LIST CTL_CODE(IOCTL_SCSI_BASE, 0x524, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  43. #define IOCTL_DISK_CLUSTER_GET_STATE CTL_CODE(IOCTL_SCSI_BASE, 0x525, METHOD_BUFFERED, FILE_ANY_ACCESS)
  44. #define IOCTL_DISK_CLUSTER_RESERVE_INFO CTL_CODE(IOCTL_SCSI_BASE, 0x526, METHOD_BUFFERED, FILE_ANY_ACCESS)
  45. // Attach to specified signature. Before attaching, offline the disk/volume then dismount.
  46. // Any FS cached data is thrown away. The old attach IOCTL will dismount, then offline.
  47. #define IOCTL_DISK_CLUSTER_ATTACH_OFFLINE CTL_CODE(IOCTL_SCSI_BASE, 0x526, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  48. //
  49. // Obsolete clusdisk IOCTLs. All are failed by the clusdisk driver.
  50. //
  51. #define IOCTL_DISK_CLUSTER_RESET_BUS CTL_CODE(IOCTL_SCSI_BASE, 0x501, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  52. #define IOCTL_DISK_CLUSTER_READ_CAPACITY CTL_CODE(IOCTL_SCSI_BASE, 0x502, METHOD_BUFFERED, FILE_READ_ACCESS)
  53. #define IOCTL_DISK_CLUSTER_RESERVE CTL_CODE(IOCTL_SCSI_BASE, 0x503, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  54. #define IOCTL_DISK_CLUSTER_RELEASE CTL_CODE(IOCTL_SCSI_BASE, 0x504, METHOD_BUFFERED, FILE_WRITE_ACCESS)
  55. #define IOCTL_DISK_CLUSTER_GET_DRIVE_LAYOUT CTL_CODE(IOCTL_SCSI_BASE, 0x507, METHOD_BUFFERED, FILE_READ_ACCESS)
  56. #define IOCTL_DISK_CLUSTER_ROOT CTL_CODE(IOCTL_SCSI_BASE, 0x511, METHOD_BUFFERED, FILE_READ_ACCESS)
  57. #define IOCTL_DISK_CLUSTER_GET_DRIVE_LETTER CTL_CODE(IOCTL_SCSI_BASE, 0x515, METHOD_BUFFERED, FILE_ANY_ACCESS)
  58. #define IOCTL_DISK_CLUSTER_NT4_CAPABLE CTL_CODE(IOCTL_SCSI_BASE, 0x517, METHOD_BUFFERED, FILE_ANY_ACCESS)
  59. #define IOCTL_DISK_CLUSTER_CHANGE_NOTIFY CTL_CODE(IOCTL_SCSI_BASE, 0x518, METHOD_BUFFERED, FILE_ANY_ACCESS)
  60. #define IOCTL_DISK_CLUSTER_HOLD_IO CTL_CODE(IOCTL_SCSI_BASE, 0x519, METHOD_BUFFERED, FILE_ANY_ACCESS)
  61. #define IOCTL_DISK_CLUSTER_RESUME_IO CTL_CODE(IOCTL_SCSI_BASE, 0x520, METHOD_BUFFERED, FILE_ANY_ACCESS)
  62. //
  63. // Setting disk state requires disk signature to be specified.
  64. //
  65. typedef struct _SET_DISK_STATE_PARAMS {
  66. ULONG Signature;
  67. UCHAR NewState;
  68. UCHAR OldState;
  69. } SET_DISK_STATE_PARAMS, *PSET_DISK_STATE_PARAMS;
  70. //
  71. // Info about last completed reserve.
  72. //
  73. typedef struct _RESERVE_INFO {
  74. ULONG Signature;
  75. NTSTATUS ReserveFailure;
  76. LARGE_INTEGER LastReserveEnd;
  77. LARGE_INTEGER CurrentTime;
  78. LONG ArbWriteCount;
  79. LONG ReserveCount;
  80. } RESERVE_INFO, *PRESERVE_INFO;
  81. //
  82. // Use this GUID to insure that onlines from other drivers are blocked until
  83. // we online the device.
  84. //
  85. // {7AFCFABA-87D1-4421-9848-5481DD73E910}
  86. //
  87. DEFINE_GUID( GUID_CLUSTER_CONTROL,
  88. 0x7afcfaba, 0x87d1, 0x4421, 0x98, 0x48, 0x54, 0x81, 0xdd, 0x73, 0xe9, 0x10);
  89. #endif // _CLUSTER_DISK_