3.3.5.15.9 Handling a Resiliency Request

This section applies only to servers that implement the SMB 2.1 or the SMB 3.x dialect family.

When the server receives a request with an SMB2 header with a Command value equal to SMB2 IOCTL and a CtlCode FSCTL_LMR_REQUEST_RESILIENCY, message handling proceeds as follows.

If Open.Connection.Dialect is "2.0.2", the server MAY<397> fail the request with STATUS_INVALID_DEVICE_REQUEST.

Otherwise, if the server does not support FSCTL_LMR_REQUEST_RESILIENCY requests, the server SHOULD fail the request with STATUS_NOT_SUPPORTED.

If InputCount is smaller than the size of the NETWORK_RESILIENCY_REQUEST request as specified in section 2.2.31.3, or if the requested Timeout in seconds is greater than MaxResiliencyTimeout in seconds, the request MUST be failed with STATUS_INVALID_PARAMETER.

Open.IsDurable MUST be set to FALSE. Open.IsResilient MUST be set to TRUE. If the value of the Timeout field specified in NETWORK_RESILIENCY_REQUEST of the request is not zero, Open.ResiliencyTimeout MUST be set to the value of the Timeout field; otherwise, Open.ResiliencyTimeout SHOULD be set to an implementation-specific value.<398> Open.DurableOwner MUST be set to a security descriptor accessible only by the user represented by Open.Session.SecurityContext.

The server MUST construct an SMB2 IOCTL response following the syntax specified in section 2.2.32, with the following values:

  • CtlCode MUST be set to FSCTL_LMR_REQUEST_RESILIENCY.

  • 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 zero.

  • Flags MUST be set to zero.

The response MUST be sent to the client.