3.2.5.3 Receiving a Read Request

When the server receives a read request, the server MUST locate the Open in the OpenTable, where Open.LocalOpen matches the Open provided by the SMB2 server, as specified in [MS-SMB2] section 3.2.5.12.

If no Open is found, the server MUST fail the request with the STATUS_INVALID_PARAMETER code.

If the Open is found, Open.IsVirtualSCSIDisk is true, and Open.InitiatorId is zero, the server MUST process as follows:

  • If Open.SenseErrorSequence is 0xFF, the server MUST reset Open.SenseErrorSequence to 0x00. Otherwise, the server MUST increment the Open.SenseErrorSequence by 0x01.

  • The server MUST update SenseError in Open.SenseErrorDataList at index Open.SenseErrorSequence as follows:

    • SenseError.StatusKey MUST be set to Open.SenseErrorSequence.

    • Update other fields of SenseError with an implementation-specific<11> value.

  • The server MUST return the error (STATUS_SVHDX_ERROR_STORED | SenseError.StatusKey) to the client.

If the Open is found and the FILE_NO_INTERMEDIATE_BUFFERING bit is not set in Open.CreateOptions, the server MUST fail the request with the STATUS_NOT_SUPPORTED code.

If the Open is found and Open.IsVirtualSCSIDisk is FALSE, the server MUST issue a read to the underlying object store; otherwise the server MUST pass the request to the virtual SCSI disk in an implementation-specific manner.

If the underlying object store or virtual SCSI disk indicates the read is successful, the server MUST return the read data buffer and success to the client.

If the underlying object store or virtual SCSI disk indicates that the read failed, and the received error code is specified in the section 2.2.3, the server MUST return the error code.

If the underlying object store is the virtual SCSI disk and the error code is not specified in section 2.2.3, the server MUST store the received sense data and return an error as follows:

  • If Open.SenseErrorSequence is 0xFF, the server MUST reset Open.SenseErrorSequence to 0x00. Otherwise, the server MUST increment the Open.SenseErrorSequence by 0x01.

  • The server MUST update SenseError in Open.SenseErrorDataList at index Open.SenseErrorSequence as follows:

    • SenseError.StatusKey MUST be set to Open.SenseErrorSequence.

    • SenseError.SrbStatus MUST be set to one of the values provided by the virtual SCSI disk, as specified in section 2.2.5.

    • SenseError.ScsiStatus MUST be set to the value provided by the virtual SCSI disk.

    • SenseError.SenseData MUST be set to the data provided by the virtual SCSI disk.<12>

  • The server MUST return the error (STATUS_SVHDX_ERROR_STORED | SenseError.StatusKey) to the client.

Show: