4.2 Associating a Handle to a Logical Flow and Configuring Policy
The following diagram demonstrated the steps taken to open a remote file, associate the corresponding handle to a logical flow and configure a QoS policy for the logical flow.

Figure 1: Associating a handle to a logical flow and configuring policy
The client sends an SMB2 CREATE Request to open a remote file.
The server responds with an SMB2 CREATE Response giving the handle to the open identifying the remote file.
The client sends an SMB2 IOCTL Request with a STORAGE_QOS_CONTROL_REQUEST buffer to create a logical flow and associate the handle to the logical flow:
01 01 00 00 01 00 00 00 E4 32 3A B1 AD E2 B2 5D A4 F8 5C D3 BE 9D 69 6E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ProtocolVersion: 0x0101 Reserved: 0x0000 Options: 0x00000001 (STORAGE_QOS_CONTROL_FLAG_SET_LOGICAL_FLOW_ID) LogicalFlowID: b13a32e4-e2ad-5db2-a4f8-5cd3be9d696e [all other fields zero]
The server sends an SMB2 IOCTL Response with STATUS_SUCCESS and no output buffer.
The client sends an SMB2 IOCTL Request with a STORAGE_QOS_CONTROL_REQUEST buffer to set the policy for the logical flow:
01 01 00 00 02 00 00 00 E4 32 3A B1 AD E2 B2 5D A4 F8 5C D3 BE 9D 69 6E 4E F2 B4 04 E9 B3 94 45 AD AA E3 27 52 8D E5 4B C6 4D 9E 1B C0 F8 9F 41 87 85 80 65 BC FF 72 84 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 68 00 0E 00 76 00 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 00 45 00 53 00 54 00 2D 00 56 00 4D 00 48 00 59 00 50 00 45 00 52 00 56 00 2D 00 54 00 45 00 53 00 54 00 2E 00 6E 00 74 00 64 00 65 00 76 00 2E 00 63 00 6F 00 72 00 70 00 2E 00 6D 00 69 00 63 00 72 00 6F 00 73 00 6F 00 66 00 74 00 2E 00 63 00 6F 00 6D 00 ProtocolVersion: 0x0101 Reserved: 0x0000 Options: 0x00000002 (STORAGE_QOS_CONTROL_FLAG_SET_POLICY) LogicalFlowID: b13a32e4-e2ad-5db2-a4f8-5cd3be9d696e PolicyID: 04b4f24e-b3e9-4594-adaa-e327528de54b InitiatorID: 1b9e4dc6-f8c0-419f-8785-8065bcff7284 Limit: 0x0000000000000000 Reservation: 0x0000000000000000 InitiatorNameOffset: 104 (0x0068) InitiatorNameLength: 14 (0x000E) InitiatorNodeNameOffset: 118 (0x0076) InitiatorNodeNameLength: 46 (0x002E) IoCountIncrement: 0x0000000000000000 NormalizedIoCountIncrement: 0x0000000000000000 LatencyIncrement: 0x0000000000000000 LowerLatencyIncrement: 0x0000000000000000 BandwidthLimit: 0x0000000000000000 KilobyteCountIncrement: 0x0000000000000000 InitiatorName: "TEST-VM" InitiatorNodeName: "HYPERV-TEST.contoso.com"
The server sends an SMB2 IOCTL Response with STATUS_SUCCESS and no output buffer.