Compartir a través de


2.3.44 FSCTL_OFFLOAD_WRITE Reply

The FSCTL_OFFLOAD_WRITE Reply message returns the results of the FSCTL_OFFLOAD_WRITE Request (section 2.3.43).

The FSCTL_OFFLOAD_WRITE_OUTPUT data element is as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Size

Flags

LengthWritten

...

Size (4 bytes): A 32-bit unsigned integer that indicates the size, in bytes, of the returned data element.

Flags (4 bytes): A 32-bit unsigned integer that indicates which flags were returned for this operation. Currently, no flags are defined. This field SHOULD be set to 0x00000000 and MUST be ignored.

LengthWritten (8 bytes): A 64-bit unsigned integer that contains the amount, in bytes, of data that was written. The value of this field MUST be greater than or equal to zero and MUST be aligned to a logical sector boundary on the volume. This value can be smaller than the CopyLength field specified in the FSCTL_OFFLOAD_WRITE_INPUT data element. A smaller value indicates that less data was logically written with the specified Token than was requested. This field MUST NOT be greater than the CopyLength field specified in the FSCTL_OFFLOAD_WRITE_INPUT data element, meaning it is incorrect to copy more than what was requested<43>.

This message returns a status code as specified in section 2.2. Upon success, the status code returned by the function that processes this FSCTL is STATUS_SUCCESS. The most common error codes are listed in the following table.

Error code

Meaning

STATUS_INVALID_DEVICE_REQUEST

0xC0000010

The file system does not support offload operations.

STATUS_INVALID_PARAMETER

0xC000000D

At least one of the following assertions is true:

  • The target file is smaller than the logical sector size.

  • The FileOffset field is not a multiple of the logical sector size of the volume.

  • The CopyLength field is not a multiple of the logical sector size of the volume.

  • The TransferOffset field is not a multiple of the logical sector size of the volume.

  • The FileOffset field is greater than the Valid Data Length (VDL) for the file.

  • The Size field is not equivalent to the size of an FSCTL_OFFLOAD_WRITE_INPUT data element.

  • Adding the FileOffset and CopyLength fields results in the overflow of a 64-bit value.

STATUS_OFFLOAD_WRITE_FILE_NOT_SUPPORTED

0xC000A2A4

Offload operations cannot be performed on:

  • Compressed Files

  • Sparse Files

  • Encrypted Files

  • File System Metadata Files

STATUS_NOT_SUPPORTED

0xC00000BB

The file system indicates that the volume does not support the Offload Write operation.

STATUS_OFFLOAD_WRITE_FLT_NOT_SUPPORTED

0xC000A2A2

A file system filter on the server has not opted in for Offload Write support.

STATUS_FILE_DELETED

0xC0000123

The specified data stream was not valid.

STATUS_FILE_CLOSED

0xC0000128

The specified file handle is closed.

STATUS_END_OF_FILE

0xC0000011

The file offset for the write is beyond the End Of the File (EOF).

STATUS_MEDIA_WRITE_PROTECTED

0xC00000A2

The volume is read only.

STATUS_INSUFFICIENT_RESOURCES

0xC000009A

There were insufficient resources to complete the operation.

STATUS_BUFFER_TOO_SMALL

0xC0000023

The input buffer is too small to contain an FSCTL_OFFLOAD_WRITE_INPUT data element.

or

The output buffer is too small to contain an FSCTL_OFFLOAD_WRITE_OUTPUT data element.

STATUS_DEVICE_FEATURE_NOT_SUPPORTED

0xC0000463

The storage device does not support Offload Write.

STATUS_DEVICE_UNREACHABLE

0xC0000464

Data cannot be moved by Offload Write because the source device cannot communicate with the destination device.

STATUS_INVALID_TOKEN

0xC0000465L

The token representing the data is invalid or expired.