-----Original Message-----
From: Mike Christie <[email protected]>
Reply-To: "[email protected]" <[email protected]>
Date: Tuesday 4 December 2012 8:56 AM
To: "[email protected]" <[email protected]>
Subject: Re: [RFC_V3 PATCH 1/2] scsi_transport_iscsi: Add flash target
mgmt support through sysfs

>On 11/30/2012 06:16 AM, [email protected] wrote:
>> From: Adheer Chandravanshi <[email protected]>
>>
>> This patch allows iscsiadm to manage iSCSI target information stored on
>> adapter flash on per host basis.
>>
>> The sysfs entries will look as cited below:
>>     /sys/class/iscsi_flash_tgt/tgt-<host_no>-<target_no>/
>>
>> Eg:
>>     /sys/class/iscsi_flash_tgt/tgt-1-0/apply
>>     /sys/class/iscsi_flash_tgt/tgt-1-0/login
>>     /sys/class/iscsi_flash_tgt/tgt-1-0/logout
>>     /sys/class/iscsi_flash_tgt/tgt-1-0/<Target attributes>
>>
>
>I was more asking if we could just work off the existing layout. When
>you write to /sys/class/iscsi_host/host1/add_flash_tgt, it would create
>a new /sys/class/iscsi_session/session-X entry. Then you would cd there
>and write to the files to set the values you wanted to use. Then write
>to a /sys/class/iscsi_session/session-X/login file to initiate login.
>
>Was it too difficult to modify the existing
>iscsi_cls_session/iscsi_cls_conn code for this?

We want to keep both things separate because:
1. What we are exporting in "/sys/class/iscsi_flash_tgt" is flash target
entry (persistent data) and
what gets exported in "/sys/class/iscsi_session / connection" is ram copy
(running copy) of that entry.

2. As per current implementation the session and connection objects are
created only after a target is logged in.
They are not present by default. So, for all the target entries in
"/sys/class/iscsi_flash_tgt" corresponding session and connection
class objects are created after that entry is logged in.
Also, exporting flash target entries enables user to see all the
persistent target entries even if they are not logged in.



>But a second question I have is why are you using sysfs for this when
>for the iface stuff you used netlink?

In case of iface we maintain all configuration in userspace file and then
pass it down to kernel via netlink but for flash target entries
we do not want to use netlink because we do not want to maintain files for
each flash target entry.



________________________________

This message and any attached documents contain information from QLogic 
Corporation or its wholly-owned subsidiaries that may be confidential. If you 
are not the intended recipient, you may not read, copy, distribute, or use this 
information. If you have received this transmission in error, please notify the 
sender immediately by reply e-mail and then delete this message.

-- 
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