On 12/10/2012 06:24 AM, Vikas Chaudhary wrote:
> 
> 
> -----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.

Ok. Just to make sure we are on the same page then, the flash dirs will
only present the info in flash. It will not present any of the running
info? If so then 1 and 2 make sense.



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

Netlink does not require you to store in files though. It was just due
to your implementation of the iface stuff. For the qla4xxx iface stuff I
said to not use the iface files at all, and just pass everything on the
command line.

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