On 01/08/2010 02:07 PM, Yangkook Kim wrote:
Hi, Mike. Thank you for the reply.

OK, now I see the history.

I also thought that connectionXX:0 is misleading. XX is supposed to be
iscsi session number is put after binding connection and session.

I did not get what you mean here. The XX is the session number.

Probably I should have not to say "misleading". Instead, I should have said
it "confused" me.

It seemed to me a bit strange to say like "connectionXX:0" where XX is
session number.
I was wondering why you have to say session number to describe a connection...

But, I now came to a reason by myself. It is said so probably because
it is just useful to indentiy which connection you are talking about
in one-word, and this is useful in logging.
Or, is there any other reasons?

That is pretty much it.

However, I still think it is misleading to say connectionXX:0 before binding
connection and session. In iscsid.c:session_conn_poll(), connectionXX:0 appears
before binding.

log_debug(3, "created new iSCSI session sid %d host "
           "no %u", session->id, session->hostno);


log_debug(3, "created new iSCSI connection "
           "%d:%d", session->id, conn->id);


log_debug(3, "bound iSCSI connection %d:%d to session %d",
          session->id, conn->id, session->id);

Does it fit you very natural? Is it only me to worry about it?

I think the log/comments are wrong and that causes confusion. The iscsi_connection is bound to the iscsi_session when the iscsi_connection is created. That bind_conn() code is actually telling the kernel drivers to bind the interconnect endpoint structs to the iscsi_connection struct. **iscsi_conn_bind will also set up the session->leadconn pointer, but that could be done in the create_conn callout.

But yeah, in general none of seems very natural because half the driver is in userspace and the other half is in the kernel, so there is sometimes a awkward flow. Note that sometimes the awkwardness is also due to use trying to minimize the memory allocations, because we do not want to have to allocate memory if we were trying to reconnect to a disk that needs to have data written to it to free up memory.
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-is...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to