* [PATCH] Use ida_simple for SCSI iSCSI transport session id
@ 2016-02-12 17:38 ` Lee Duncan
0 siblings, 0 replies; 18+ messages in thread
From: Lee Duncan @ 2016-02-12 17:38 UTC (permalink / raw)
To: linux-scsi-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
open-iscsi-/JYPxA39Uh5TLH3MbocFFw, Lee Duncan
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.
Note that no maximum is placed on this value, though
user-space currently only seems to use the lower 24-bits.
It seems better to handle this in user space, though,
than to limit the value range for the session ID here.
Signed-off-by: Lee Duncan <lduncan-IBi9RG/b67k@public.gmane.org>
---
drivers/scsi/scsi_transport_iscsi.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 441481623fb9..50a10bf214a8 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -79,7 +79,8 @@ struct iscsi_internal {
struct transport_container session_cont;
};
-static atomic_t iscsi_session_nr; /* sysfs session id for next new session */
+static DEFINE_IDA(iscsi_session_id_ida);
+
static struct workqueue_struct *iscsi_eh_timer_workq;
static DEFINE_IDA(iscsi_sess_ida);
@@ -2074,7 +2075,12 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
int err;
ihost = shost->shost_data;
- session->sid = atomic_add_return(1, &iscsi_session_nr);
+ session->sid = ida_simple_get(&iscsi_session_id_ida, 0, 0, GFP_KERNEL);
+ if (session->sid < 0) {
+ iscsi_cls_session_printk(KERN_ERR, session,
+ "Failure in Session ID Allocation\n");
+ return session->sid;
+ }
if (target_id == ISCSI_MAX_TARGET) {
id = ida_simple_get(&iscsi_sess_ida, 0, 0, GFP_KERNEL);
@@ -2082,7 +2088,8 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
if (id < 0) {
iscsi_cls_session_printk(KERN_ERR, session,
"Failure in Target ID Allocation\n");
- return id;
+ err = id;
+ goto release_session_id_ida;
}
session->target_id = (unsigned int)id;
session->ida_used = true;
@@ -2109,6 +2116,8 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
release_ida:
if (session->ida_used)
ida_simple_remove(&iscsi_sess_ida, session->target_id);
+release_session_id_ida:
+ ida_simple_remove(&iscsi_session_id_ida, session->target_id);
return err;
}
@@ -2214,6 +2223,7 @@ void iscsi_free_session(struct iscsi_cls_session *session)
{
ISCSI_DBG_TRANS_SESSION(session, "Freeing session\n");
iscsi_session_event(session, ISCSI_KEVENT_DESTROY_SESSION);
+ ida_simple_remove(&iscsi_session_id_ida, session->target_id);
put_device(&session->dev);
}
EXPORT_SYMBOL_GPL(iscsi_free_session);
@@ -4524,8 +4534,6 @@ static __init int iscsi_transport_init(void)
printk(KERN_INFO "Loading iSCSI transport class v%s.\n",
ISCSI_TRANSPORT_VERSION);
- atomic_set(&iscsi_session_nr, 0);
-
err = class_register(&iscsi_transport_class);
if (err)
return err;
@@ -4598,6 +4606,7 @@ static void __exit iscsi_transport_exit(void)
class_unregister(&iscsi_endpoint_class);
class_unregister(&iscsi_iface_class);
class_unregister(&iscsi_transport_class);
+ ida_destroy(&iscsi_session_id_ida);
}
module_init(iscsi_transport_init);
--
2.1.4
--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH] Use ida_simple for SCSI iSCSI transport session id
@ 2016-02-12 17:38 ` Lee Duncan
0 siblings, 0 replies; 18+ messages in thread
From: Lee Duncan @ 2016-02-12 17:38 UTC (permalink / raw)
To: linux-scsi; +Cc: linux-kernel, open-iscsi, Lee Duncan
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.
Note that no maximum is placed on this value, though
user-space currently only seems to use the lower 24-bits.
It seems better to handle this in user space, though,
than to limit the value range for the session ID here.
Signed-off-by: Lee Duncan <lduncan@suse.com>
---
drivers/scsi/scsi_transport_iscsi.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 441481623fb9..50a10bf214a8 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -79,7 +79,8 @@ struct iscsi_internal {
struct transport_container session_cont;
};
-static atomic_t iscsi_session_nr; /* sysfs session id for next new session */
+static DEFINE_IDA(iscsi_session_id_ida);
+
static struct workqueue_struct *iscsi_eh_timer_workq;
static DEFINE_IDA(iscsi_sess_ida);
@@ -2074,7 +2075,12 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
int err;
ihost = shost->shost_data;
- session->sid = atomic_add_return(1, &iscsi_session_nr);
+ session->sid = ida_simple_get(&iscsi_session_id_ida, 0, 0, GFP_KERNEL);
+ if (session->sid < 0) {
+ iscsi_cls_session_printk(KERN_ERR, session,
+ "Failure in Session ID Allocation\n");
+ return session->sid;
+ }
if (target_id == ISCSI_MAX_TARGET) {
id = ida_simple_get(&iscsi_sess_ida, 0, 0, GFP_KERNEL);
@@ -2082,7 +2088,8 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
if (id < 0) {
iscsi_cls_session_printk(KERN_ERR, session,
"Failure in Target ID Allocation\n");
- return id;
+ err = id;
+ goto release_session_id_ida;
}
session->target_id = (unsigned int)id;
session->ida_used = true;
@@ -2109,6 +2116,8 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
release_ida:
if (session->ida_used)
ida_simple_remove(&iscsi_sess_ida, session->target_id);
+release_session_id_ida:
+ ida_simple_remove(&iscsi_session_id_ida, session->target_id);
return err;
}
@@ -2214,6 +2223,7 @@ void iscsi_free_session(struct iscsi_cls_session *session)
{
ISCSI_DBG_TRANS_SESSION(session, "Freeing session\n");
iscsi_session_event(session, ISCSI_KEVENT_DESTROY_SESSION);
+ ida_simple_remove(&iscsi_session_id_ida, session->target_id);
put_device(&session->dev);
}
EXPORT_SYMBOL_GPL(iscsi_free_session);
@@ -4524,8 +4534,6 @@ static __init int iscsi_transport_init(void)
printk(KERN_INFO "Loading iSCSI transport class v%s.\n",
ISCSI_TRANSPORT_VERSION);
- atomic_set(&iscsi_session_nr, 0);
-
err = class_register(&iscsi_transport_class);
if (err)
return err;
@@ -4598,6 +4606,7 @@ static void __exit iscsi_transport_exit(void)
class_unregister(&iscsi_endpoint_class);
class_unregister(&iscsi_iface_class);
class_unregister(&iscsi_transport_class);
+ ida_destroy(&iscsi_session_id_ida);
}
module_init(iscsi_transport_init);
--
2.1.4
^ permalink raw reply related [flat|nested] 18+ messages in thread[parent not found: <1455298733-18651-1-git-send-email-lduncan-IBi9RG/b67k@public.gmane.org>]
* Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id
2016-02-12 17:38 ` Lee Duncan
@ 2016-02-12 17:54 ` James Bottomley
-1 siblings, 0 replies; 18+ messages in thread
From: James Bottomley @ 2016-02-12 17:54 UTC (permalink / raw)
To: Lee Duncan, linux-scsi-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
open-iscsi-/JYPxA39Uh5TLH3MbocFFw
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? For sequential sessions it
means that the ID of the next session will be re-used, i.e. the same as
the previous sessions, which could lead to target confusion. I think
local uniqueness of session IDs is more important than wrap around
because sessions are short lived entities and the chances of the same
session being alive by the time we've wrapped is pretty tiny.
If you can demostrate a multi-target problem, perhaps we should rather
fix this by making the next session id a target local quantity?
James
--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id
@ 2016-02-12 17:54 ` James Bottomley
0 siblings, 0 replies; 18+ messages in thread
From: James Bottomley @ 2016-02-12 17:54 UTC (permalink / raw)
To: Lee Duncan, linux-scsi; +Cc: linux-kernel, open-iscsi
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? For sequential sessions it
means that the ID of the next session will be re-used, i.e. the same as
the previous sessions, which could lead to target confusion. I think
local uniqueness of session IDs is more important than wrap around
because sessions are short lived entities and the chances of the same
session being alive by the time we've wrapped is pretty tiny.
If you can demostrate a multi-target problem, perhaps we should rather
fix this by making the next session id a target local quantity?
James
^ permalink raw reply [flat|nested] 18+ messages in thread
[parent not found: <1455299691.2396.45.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>]
* Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id
2016-02-12 17:54 ` James Bottomley
@ 2016-02-12 22:13 ` Mike Christie
-1 siblings, 0 replies; 18+ messages in thread
From: Mike Christie @ 2016-02-12 22:13 UTC (permalink / raw)
To: open-iscsi-/JYPxA39Uh5TLH3MbocFFw, Lee Duncan,
linux-scsi-u79uwXL29TY76Z2rM5mHXA
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA
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.
--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id
@ 2016-02-12 22:13 ` Mike Christie
0 siblings, 0 replies; 18+ messages in thread
From: Mike Christie @ 2016-02-12 22:13 UTC (permalink / raw)
To: open-iscsi, Lee Duncan, linux-scsi; +Cc: linux-kernel
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.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id
2016-02-12 17:54 ` James Bottomley
(?)
(?)
@ 2016-02-15 18:26 ` Chris Leech
[not found] ` <20160215182653.pvo6crry2wqwgjso-r8IHplWLGbA5tHQWs+pTeqPFFGjUI2lm2LY78lusg7I@public.gmane.org>
-1 siblings, 1 reply; 18+ messages in thread
From: Chris Leech @ 2016-02-15 18:26 UTC (permalink / raw)
To: open-iscsi; +Cc: Lee Duncan, linux-scsi, linux-kernel
On Fri, Feb 12, 2016 at 09:54:51AM -0800, 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? For sequential sessions it
> means that the ID of the next session will be re-used, i.e. the same as
> the previous sessions, which could lead to target confusion. I think
> local uniqueness of session IDs is more important than wrap around
> because sessions are short lived entities and the chances of the same
> session being alive by the time we've wrapped is pretty tiny.
I've got a few complaints about target resources being tied up because
we don't reuse session IDs. The ISID becomes a component in the
I_T nexus identifier, so changing it invalidates persistent reservations.
> If you can demostrate a multi-target problem, perhaps we should rather
> fix this by making the next session id a target local quantity?
Mike's got a good point that we don't really need to base the ISID off
of our local session identifier (kobject name). I think getting reuse
right may be a bit trickier than being a target local value, because it
needs to be unique across target portal groups. Which probably furthers
the argument that we should deal with that in the userspace tools.
If we plan to split the protocol ISID cleanly from the kobject name,
I guess the question is if aggressive reuse of the local identifier is
better than dealing with the unlikely collision on rollover?
- Chris
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id
2016-02-12 17:54 ` James Bottomley
` (2 preceding siblings ...)
(?)
@ 2016-03-08 1:02 ` Lee Duncan
[not found] ` <56DE24A8.2060305-IBi9RG/b67k@public.gmane.org>
-1 siblings, 1 reply; 18+ messages in thread
From: Lee Duncan @ 2016-03-08 1:02 UTC (permalink / raw)
To: James Bottomley, linux-scsi; +Cc: linux-kernel, open-iscsi
On 02/12/2016 09: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? For sequential sessions it
> means that the ID of the next session will be re-used, i.e. the same as
> the previous sessions, which could lead to target confusion. I think
> local uniqueness of session IDs is more important than wrap around
> because sessions are short lived entities and the chances of the same
> session being alive by the time we've wrapped is pretty tiny.
>
> If you can demostrate a multi-target problem, perhaps we should rather
> fix this by making the next session id a target local quantity?
>
> James
>
It looks like Mike and Chris are good with it. And I'd really like to
get rid of yet another atomic int.
Are you satisfied with this one?
--
Lee
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id
2016-02-12 17:38 ` Lee Duncan
@ 2016-03-08 17:21 ` Chris Leech
-1 siblings, 0 replies; 18+ messages in thread
From: Chris Leech @ 2016-03-08 17:21 UTC (permalink / raw)
To: linux-scsi-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: open-iscsi-/JYPxA39Uh5TLH3MbocFFw, Lee Duncan
On Fri, Feb 12, 2016 at 09:38:53AM -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.
>
> Note that no maximum is placed on this value, though
> user-space currently only seems to use the lower 24-bits.
> It seems better to handle this in user space, though,
> than to limit the value range for the session ID here.
>
> Signed-off-by: Lee Duncan <lduncan-IBi9RG/b67k@public.gmane.org>
Acked-by: Chris Leech <cleech-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id
@ 2016-03-08 17:21 ` Chris Leech
0 siblings, 0 replies; 18+ messages in thread
From: Chris Leech @ 2016-03-08 17:21 UTC (permalink / raw)
To: linux-scsi, linux-kernel; +Cc: open-iscsi, Lee Duncan
On Fri, Feb 12, 2016 at 09:38:53AM -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.
>
> Note that no maximum is placed on this value, though
> user-space currently only seems to use the lower 24-bits.
> It seems better to handle this in user space, though,
> than to limit the value range for the session ID here.
>
> Signed-off-by: Lee Duncan <lduncan@suse.com>
Acked-by: Chris Leech <cleech@redhat.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id
2016-02-12 17:38 ` Lee Duncan
@ 2016-03-09 8:43 ` Johannes Thumshirn
-1 siblings, 0 replies; 18+ messages in thread
From: Johannes Thumshirn @ 2016-03-09 8:43 UTC (permalink / raw)
To: Lee Duncan
Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
open-iscsi-/JYPxA39Uh5TLH3MbocFFw
On Fri, Feb 12, 2016 at 09:38:53AM -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.
>
> Note that no maximum is placed on this value, though
> user-space currently only seems to use the lower 24-bits.
> It seems better to handle this in user space, though,
> than to limit the value range for the session ID here.
>
> Signed-off-by: Lee Duncan <lduncan-IBi9RG/b67k@public.gmane.org>
Reviewed-by: Johannes Thumshirn <jthumshirn-l3A5Bk7waGM@public.gmane.org>
--
Johannes Thumshirn Storage
jthumshirn-l3A5Bk7waGM@public.gmane.org +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at https://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id
@ 2016-03-09 8:43 ` Johannes Thumshirn
0 siblings, 0 replies; 18+ messages in thread
From: Johannes Thumshirn @ 2016-03-09 8:43 UTC (permalink / raw)
To: Lee Duncan; +Cc: linux-scsi, linux-kernel, open-iscsi
On Fri, Feb 12, 2016 at 09:38:53AM -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.
>
> Note that no maximum is placed on this value, though
> user-space currently only seems to use the lower 24-bits.
> It seems better to handle this in user space, though,
> than to limit the value range for the session ID here.
>
> Signed-off-by: Lee Duncan <lduncan@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2016-03-09 8:44 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-12 17:38 [PATCH] Use ida_simple for SCSI iSCSI transport session id Lee Duncan
2016-02-12 17:38 ` Lee Duncan
[not found] ` <1455298733-18651-1-git-send-email-lduncan-IBi9RG/b67k@public.gmane.org>
2016-02-12 17:54 ` James Bottomley
2016-02-12 17:54 ` James Bottomley
[not found] ` <1455299691.2396.45.camel-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
2016-02-12 22:13 ` Mike Christie
2016-02-12 22:13 ` Mike Christie
2016-02-15 18:26 ` Chris Leech
[not found] ` <20160215182653.pvo6crry2wqwgjso-r8IHplWLGbA5tHQWs+pTeqPFFGjUI2lm2LY78lusg7I@public.gmane.org>
2016-02-16 18:40 ` Mike Christie
2016-02-16 18:40 ` Mike Christie
[not found] ` <56C36D0C.3030002-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2016-02-17 22:37 ` Chris Leech
2016-02-17 22:37 ` Chris Leech
2016-03-08 1:02 ` Lee Duncan
[not found] ` <56DE24A8.2060305-IBi9RG/b67k@public.gmane.org>
2016-03-08 2:15 ` Martin K. Petersen
2016-03-08 2:15 ` Martin K. Petersen
2016-03-08 17:21 ` Chris Leech
2016-03-08 17:21 ` Chris Leech
2016-03-09 8:43 ` Johannes Thumshirn
2016-03-09 8:43 ` Johannes Thumshirn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.