From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Bottomley Subject: Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id Date: Fri, 12 Feb 2016 09:54:51 -0800 Message-ID: <1455299691.2396.45.camel@HansenPartnership.com> References: <1455298733-18651-1-git-send-email-lduncan@suse.com> Reply-To: open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <1455298733-18651-1-git-send-email-lduncan-IBi9RG/b67k@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Lee Duncan , linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: linux-scsi@vger.kernel.org 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752602AbcBLRyy (ORCPT ); Fri, 12 Feb 2016 12:54:54 -0500 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:45880 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751242AbcBLRyx (ORCPT ); Fri, 12 Feb 2016 12:54:53 -0500 Message-ID: <1455299691.2396.45.camel@HansenPartnership.com> Subject: Re: [PATCH] Use ida_simple for SCSI iSCSI transport session id From: James Bottomley To: Lee Duncan , linux-scsi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, open-iscsi@googlegroups.com Date: Fri, 12 Feb 2016 09:54:51 -0800 In-Reply-To: <1455298733-18651-1-git-send-email-lduncan@suse.com> References: <1455298733-18651-1-git-send-email-lduncan@suse.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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