On 2022/10/23 11:21, Mike Christie wrote: >> I have some wonder about the target_id like be2iscsi which allocated from >> iscsi_sess_ida. Should not we get the target_id from iSCSI target? >> If they allocate target_id with an random value, how to handle the >> iscsi_user_scan_session which would check the session's target_id. >> > For iscsi, that target id is only a number that's used on the initiator side > to track the target. The target has no idea what it is and it's never > sent/used/passed to the target. > > For example, the qla4xxx driver uses it to lookup persistent target info it > has stored on it's flash. The other use is that we need a unique name for > the target in sysfs and that target id is used as part of that name. > . Thanks for your answer, I would update this patch and open-iscsi's PR.