Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1333175
| From | Mike Christie <michaelc@cs.wisc.edu> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id |
| Date | 2016-02-12 23:20 +0100 |
| Message-ID | <r1ued-4Bn-9@gated-at.bofh.it> (permalink) |
| References | <r1q0W-1Ii-31@gated-at.bofh.it> <r1qaB-1Lx-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 02/12/2016 11:54 AM, James Bottomley wrote: > On Fri, 2016-02-12 at 09:38 -0800, Lee Duncan wrote: >> The scsi_transport_iscsi module already uses the ida_simple >> routines for managing the target ID, if requested to do >> so. This change replaces an ever-increasing atomic integer >> that tracks the session ID itself with the ida_simple >> family of routines. This means that the session ID >> will be reclaimed and can be reused when the session >> is freed. > > Is reusing session ID's really a good idea? I think it is if we do it by the iscsi rfc. We have two issues. 1. For iSCSI's iSID we need a 24 bit id. The iSID + initiator name is the SCSI initiator port ID, so targets want the iSID to be reused for things like persistent reservation tracking. There are a couple red hat bugzillas. I am not sure if they are open though. Here is a KB https://access.redhat.com/solutions/66861 for more info. We have been lazy and did not implement this and were just reusing part of the session->sid. 2. For the kobject/sysfs name we want a unique name/id. Linux boxes stay up a long time and some users login and logout of sessions a lot. We roll over and have collisions. Lee's patch was only meant to fix this. The reuse part was not meant to fix #1, and so it does not handle every case like you suspect. To fix everything how about this: - Use Lee's patch to fix #2. We do not need the iSID to match the sysfs name. Userspace does not do any type of iSCSI iSID <-> kernel session id matching. - For #1, in the userespace node db code we can implement some iSID allocation/management code that follows the spec. We can also add a blacklist there in case we find broken targets.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] Use ida_simple for SCSI iSCSI transport session id Lee Duncan <lduncan@suse.com> - 2016-02-12 18:50 +0100
Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id James Bottomley <James.Bottomley@HansenPartnership.com> - 2016-02-12 19:00 +0100
Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id Mike Christie <michaelc@cs.wisc.edu> - 2016-02-12 23:20 +0100
Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id Chris Leech <cleech@redhat.com> - 2016-02-15 19:30 +0100
Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id Mike Christie <michaelc@cs.wisc.edu> - 2016-02-16 19:50 +0100
Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id Chris Leech <cleech@redhat.com> - 2016-02-17 23:40 +0100
csiph-web