IOCTL_VOLUME_PHYSICAL_TO_LOGICAL IOCTL

Returns the logical offset corresponding to a physical disk number and a physical offset.

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

Major Code

IRP_MJ_DEVICE_CONTROL

Input Buffer

Caller inserts the VOLUME_PHYSICAL_OFFSET structure, containing the physical offset and physical disk number, 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_PHYSICAL_OFFSET).

Output Buffer

The volume manager returns the logical offset in the VOLUME_LOGICAL_OFFSET 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, which must be greater than or equal to the value of sizeof(VOLUME_LOGICAL_OFFSET).

Status Block

If the operation is successful, the Status member is set to STATUS_SUCCESS.

If either the input or output buffer is too small, the volume manager sets the Status member to STATUS_BUFFER_TOO_SMALL. If data is returned in the output buffer but the buffer is too small to receive all of it, the volume manager sets the Status member to STATUS_BUFFER_OVERFLOW. The Information member is set to the size of the output buffer provided by the caller.

If the given physical disk number and physical offset do not belong to the volume or if they are taken from RAID parity data, this call will fail with STATUS_INVALID_PARAMETER.

Requirements

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

See Also

IOCTL_VOLUME_LOGICAL_TO_PHYSICAL

VOLUME_LOGICAL_OFFSET

VOLUME_PHYSICAL_OFFSET

VOLUME_PHYSICAL_OFFSETS