Partager via


3.3.5.15.6.1 Sending a Copy Failure Server-Side Copy Response

If a range is encountered that is not copied successfully, the server MUST construct an SMB2 IOCTL Response following the syntax specified in section 2.2.32, with the following values:

  • Status in the SMB2 header MUST be set to the error that is returned during processing, as specified in section 3.3.5.15.6.

  • CtlCode MUST be set to the CtlCode value in the SMB2 IOCTL Request.

  • FileId.Persistent MUST be set to Open.DurableFileId. FileId.Volatile MUST be set to Open.FileId.

  • InputOffset SHOULD be set to the offset, in bytes, from the beginning of the SMB2 header to the Buffer[] field of the response.

  • InputCount SHOULD be set to zero.

  • OutputOffset MUST be set to InputOffset + InputCount, rounded up to a multiple of 8.

  • OutputCount MUST be set to 12.

  • Flags MUST be set to zero.

  • The server MUST copy a SRV_COPYCHUNK_RESPONSE following the syntax specified in section 2.2.32.1 into the Buffer field at the OutputOffset computed above. ChunksWritten MUST be set to the number of chunks successfully written. If the error was encountered partway through a write, ChunkBytesWritten MUST be set to the number of bytes written in the final, partial write. Otherwise, ChunkBytesWritten MUST be set to 0. TotalBytesWritten MUST be set to the total number of bytes written to the destination file across all chunk writes.

The response MUST be sent to the client.