IOCTL_VOLUME_LOGICAL_TO_PHYSICAL IOCTL

Returns physical offsets and physical disk numbers for a given volume logical offset.

For example, a logical volume offset inside a mirrored volume with two plex corresponds to two physical offsets, one in each of the two disks participating in the mirror. In response to this IOCTL, the volume manager returns two physical offsets and two physical disk numbers for the logical volume offset.

The volume manager supports this IOCTL for all types of basic and dynamic volumes.

Major Code

IRP_MJ_DEVICE_CONTROL

Input Buffer

Caller inserts the VOLUME_LOGICAL_OFFSET structure containing the logical offset at the beginning of the buffer at Irp->AssociatedIrp.SystemBuffer.

Input Buffer Length

Parameters.DeviceIoControl.InputBufferLength in the I/O stack location of the IRP indicates the size, in bytes, of the input buffer, which must be greater than or equal to the value of sizeof(VOLUME_LOGICAL_OFFSET).

Output Buffer

The output buffer size must be large enough to hold the structure VOLUME_PHYSICAL_OFFSETS, which contains a variable-length array of structures of type VOLUME_PHYSICAL_OFFSET.

The volume manager returns one or more physical offsets and disk numbers in the VOLUME_PHYSICAL_OFFSETS structure at the beginning of the buffer, at Irp->AssociatedIrp.SystemBuffer.

Output Buffer Length

Parameters.DeviceIoControl.OutputBufferLength in the I/O stack location of the IRP indicates the size, in bytes, of the output buffer.

Status Block

If the operation is successful, the Status member is set to STATUS_SUCCESS. Otherwise, the Status member is set to the appropriate error code. Possible error codes include the following:

Requirements

   
Minimum supported client Available starting with Windows XP.
Header ntddvol.h (include Ntddvol.h)

See Also

IOCTL_VOLUME_PHYSICAL_TO_LOGICAL

VOLUME_LOGICAL_OFFSET

VOLUME_PHYSICAL_OFFSET

VOLUME_PHYSICAL_OFFSETS