On Feb 17, 2013, at 11:01 AM, אייל בן דוד <[email protected]> wrote:
> Hi, > > Thanks for your answer. > > 2013/2/14 Mike Christie <[email protected]> > On 02/13/2013 08:38 AM, [email protected] wrote: > > Hello all, > > > > In order to test a storage device I would like to set ISID in advance > > (e.g same ISID for two different sessions, same ISID after for reconnect > > etc) > > > > Is it possible to set the ISID values? > > No. > > > Who actually determines these values? > > The iscsi initiator. See open-iscsi/usr/initiator.c:__session_create(). > > session->isid[0] = DRIVER_ISID_0; > session->isid[1] = DRIVER_ISID_1; > session->isid[2] = DRIVER_ISID_2; > session->isid[3] = 0; > session->isid[4] = 0; > session->isid[5] = 0; > > That code inits the first couple bits. Then in session_conn_poll() we > set the last couple bits based on kernels id for the session. > > session->isid[3] = session->id; > > > Yup, I understood from this line that the ISID has a kernel part too, which > makes my request more complicated to implement. > It does not. You can stick whatever you want in that isid value. The initiator does not care. We use the kernel's sid for part of the iSID, but there is mapping/lookup between the values. We set the value and we never look at it again. We just needed a unique value and so we use the kernel's sid value for that. You can set it to whatever makes you happy. Do not worry about the kernel code. -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/open-iscsi?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
