Partager via


3.2.5.5.4 Receiving a Shared Virtual Disk Information Request

When the server receives a request with an OperationCode equal to RSVD_TUNNEL_GET_DISK_INFO_OPERATION, the request handling proceeds as follows:

If MaxOutputResponse is less than 72 (size of SVHDX_TUNNEL_OPERATION_HEADER + size of SVHDX_TUNNEL_DISK_INFO_RESPONSE), the server MUST fail the request with STATUS_BUFFER_TOO_SMALL.

The server MUST issue a query disk information request to the virtual SCSI disk in an implementation-specific manner and update the received response to the client.

If the virtual SCSI disk indicates an error, the server MUST return the SVHDX_TUNNEL_OPERATION_HEADER to the client, initialized as follows:

  • The OperationCode field MUST be set to the OperationCode value of the request.

  • The Status field MUST be set to the error returned by the virtual SCSI disk.

  • The RequestId field MUST be set to the value received in the request.

Otherwise, the server MUST construct an SVHDX_TUNNEL_DISK_INFO_RESPONSE structure as specified in section 2.2.4.4 with the following values:

The SVHDX_TUNNEL_OPERATION_HEADER MUST be initialized as follows:

  • OperationCode MUST be set to the OperationCode value of the request.

  • Status MUST be set to STATUS_SUCCESS.

  • The RequestId field MUST be set to the value received in the request.

The SVHDX_TUNNEL_DISK_INFO_RESPONSE structure MUST be initialized as follows:

  • DiskType MUST be set to the value received from the virtual SCSI disk, as specified in section 2.2.4.6.

  • If the server implements RSVD Protocol version 2 and Open.IsVHDSet is TRUE, DiskFormat MUST be set to VIRTUAL_STORAGE_TYPE_DEVICE_VHDSET. Otherwise, DiskFormat MUST be set to VIRTUAL_STORAGE_TYPE_DEVICE_VHDX.

  • BlockSize MUST be set to an implementation-specific<17> number of bytes received from the virtual SCSI disk.

  • If the virtual SCSI disk has a linked disk, LinkageID MUST be set to the unique identifier of the linked disk. Otherwise, LinkageID SHOULD be set to an implementation-specific<18> value.

  • IsMounted MUST be set to TRUE if the virtual SCSI disk indicates that the disk is ready for read or write operations. Otherwise, the server MUST set this field to FALSE.

  • Is4kAligned MUST be set to TRUE if the virtual SCSI disk indicates that the disk sectors are aligned to 4 kilobytes. Otherwise, the server MUST set this field to FALSE.

  • Reserved MUST be set to zero.

  • FileSize MUST be set to the physical size of the virtual SCSI disk on the underlying storage.

  • VirtualDiskId MUST be set to the virtual disk GUID received from the virtual SCSI disk.

The response MUST be sent to the client.