On 03/02/2010 05:24 AM, Avi Kaplan wrote:
On Tue, Mar 2, 2010 at 2:32 AM, Mike Christie<[email protected]>  wrote:

  On 03/01/2010 04:33 AM, Avi Kaplan wrote:

Hello,
The struct *iscsi_sw_tcp_conn* contains the field *struct iscsi_conn
*conn*,
which is never initialized and never used.

I am currently working on a patch that will change the open-iscsi logging
mechanism (as was discussed between Mike, Erez and Ulrich). Some of the
logging is done in the context of a connection and in those cases I use
the
struct *iscsi_conn*. Now, during my work I came across the function *
iscsi_sw_tcp_conn_restore_callbacks*, which receives *struct
iscsi_sw_tcp_conn*, from which I need to extract the *iscsi_conn* field
and
use it for logging. However, it is not initialized and hance my fix.

One more thing: The function *iscsi_sw_tcp_conn_set_callbacks* receives
*struct
iscsi_conn*. Wouldn't ii be better if
*iscsi_sw_tcp_conn_restore_callbacks*receives the same? If it had, it
would have solved my problem, but in any
case we should fix that missing field initialization (by initializing or
removing it from the struct).


If it is not used remove it.

I think you can actually get the iscsi_conn from the sk_user_data field,
but changing iscsi_sw_tcp_conn_restore_callbacks to get a iscsi_conn so it
works like set_callbacks is fine.


This patch removes the unused field.


Merged them both. They are in open-iscsi.git and linux-2.6-iscsi.git. Since they are not critical, I will send them for the next feature window. Thanks!

--
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to