3.1.4.5 CommitShadowCopySet (Opnum 4)

The CommitShadowCopySet method is invoked by the client to commit a given shadow copy set.

 DWORD CommitShadowCopySet(
         [in] handle_t hBinding,
         [in] GUID ShadowCopySetId,
         [in] unsigned long TimeOutInMilliseconds);
  

hBinding: An RPC binding handle (as defined in [C706]).

ShadowCopySetId: The GUID of the shadow copy set, assigned by the server.

TimeOutInMilliseconds: The time in milliseconds that the server MUST wait for the shadow copy commit process.

Return Values: The method returns one of the values specified in section 2.2.4. The most common error codes are listed below.

Return value/code

Description

0x80070005

E_ACCESSDENIED

The caller does not have the permissions to perform the operation.

0x80070057

E_INVALIDARG

One or more arguments are invalid.

0x80042301

FSRVP_E_BAD_STATE

The method call is invalid because of the state of the server.

0x80042500

FSSAGENT_E_TIMEOUT

The wait for the shadow copy commit operation has timed out.

0xFFFFFFFF

FSRVP_E_WAIT_FAILED

The wait for shadow copy commit operation has failed.

0x80042501

FSRVP_E_SHADOWCOPYSET_ID_MISMATCH

The provided ShadowCopySetId does not exist.

The server MUST look up the ShadowCopySet from GlobalShadowCopysetTable using the index ShadowCopySetId. If no entry is found, the server MUST fail the call with FSRVP_E_SHADOWCOPYSET_ID_MISMATCH.

If ShadowCopySet.Status is not "Added" or "CreationinProgress", the server MUST fail the call with FSRVP_E_BAD_STATE.

The server MUST stop the Message Sequence Timer as specified in section 3.1.2.

The server MUST set ShadowCopySet.Status to "CreationInProgress", MUST start the shadow copy commit in the underlying shadow copy utility, and MUST wait for the completion of the shadow copy commit process.

If the wait for the commit process fails, the server MUST set ShadowCopySet.Status to "Added", start the Message Sequence Timer as specified in section 3.1.2 with a timeout value of 180 seconds, and fail the call with FSRVP_E_WAIT_FAILED.

If the commit operation for all shadow copies in this set does not complete within TimeOutInMilliseconds, the server MUST start the Message Sequence Timer as specified in section 3.1.2 with a timeout value of 180 seconds, and return FSSAGENT_E_TIMEOUT.

If the commit operation for any shadow copy returns an error, the server MUST start the Message Sequence Timer as specified in section 3.1.2 with a timeout value of 180 seconds, and return the same error code to the caller.

If the shadow copy commit operation for all shadow copies in this set completes within TimeOutInMilliseconds, the server MUST update ShadowCopySet.Status to "Committed", start the Message Sequence Timer as specified in section 3.1.2 with a timeout value of 180 seconds, and return ZERO to the caller.