3.2.4.22 CprepDiskIsPRPresent (Opnum 31)

The CprepDiskIsPRPresent method determines whether there are any PERSISTENT RESERVE reservations on the disk.

 HRESULT CprepDiskIsPRPresent(
   [in] CPREP_DISKID DiskId,
   [out] unsigned long* Present
 );

DiskId: The identifier of the ClusPrepDisk representing the disk.

Present: MUST be 0x00000000 if no reserves are present. MUST be 0x00000001 or 0x00000002 if reserves are present.

Value

Meaning

0x00000000

No reserves are present.

0x00000001

A persistent reservation is present and is not held by the local server.

0x00000002

A persistent reservation is present and is held by the local server.<15>

Return Values: A signed 32-bit value that indicates return status. If the method returns a negative value, it has failed. Zero or positive values indicate success, with the lower 16 bits in positive nonzero values containing warnings or flags defined in the method implementation. For more information about Win32 error codes and HRESULT values, see [MS-ERREF] sections 2.2 and 2.1.

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070002

ERROR_FILE_NOT_FOUND

The disk was not found.

0x80070548

ERROR_INVALID_SERVER_STATE

The server's Prepare State is not Online.

For any other condition, this method MUST return a value that is not one of the values listed in the preceding table. The client MUST behave in one consistent, identical manner for all values that are not listed in the preceding table.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].

The opnum field value for this method is 31.

When processing this call, the server MUST do the following:

  • Obtain the ClusPrepDisk identified by the DiskId parameter as described in section 3.2.4.

  • Issue a PERSISTENT RESERVE IN command with a READ RESERVATION action, as specified in [SPC-3] section 6.11.

  • Set the Present parameter correctly, depending on the results.

Upon successful completion, the server returns the following data to the client:

  • A value indicating whether persistent reserves are present on the disk