From owner-freebsd-scsi@FreeBSD.ORG Tue Mar 30 14:43:55 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC34A1065670 for ; Tue, 30 Mar 2010 14:43:55 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-pz0-f180.google.com (mail-pz0-f180.google.com [209.85.222.180]) by mx1.freebsd.org (Postfix) with ESMTP id 500578FC18 for ; Tue, 30 Mar 2010 14:43:55 +0000 (UTC) Received: by pzk10 with SMTP id 10so588778pzk.28 for ; Tue, 30 Mar 2010 07:43:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:received:message-id:subject :from:to:cc:content-type; bh=R+zLCHXvQq0rdHGXybmseZIuhmQoBMP2yuAvbR/uSjM=; b=OObqFzJnUIrPl+4Y5q+/2DKdXzV9MW0mDeYb8y573oLTucufVVsfV2mWpLlSbEipuV YI79E/ess/XE7rIXZttx8x44XTRwppNZcHhYwsfPSVJeUWIXwHC9Dv0NvbkL1j+uI2b5 UlmVzi0ZXxzUsVa9Xj8WXCdHiCmThEMncfDE8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=FNVj4zX7X3A3EU5atugzcXAXw7c2q+etfwuit6HCUNn+Ewta+EX+8lLvV70rZJMwwH iJY0fNyDTOJM/BC42FJNSEWQoO6C4TgJjsI0nts1dDFdOJgJK6mwcMpVgTRKIaNKe+Xj yjLe6gzlc60Q0KApSnvrbti3v7gAMD5lzOBGQ= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.231.155.74 with HTTP; Tue, 30 Mar 2010 07:43:50 -0700 (PDT) In-Reply-To: <4BB20BF0.3090605@feral.com> References: <3bbf2fe11002281655i61a5f0a0if3f381ad0c4a1ef8@mail.gmail.com> <3bbf2fe11003031607wa3727b5ke89bc2a909d4d6a6@mail.gmail.com> <4B901419.8060800@feral.com> <3bbf2fe11003041737p30690522ya81e1b8f4bd6bbf9@mail.gmail.com> <3bbf2fe11003120601y3c403a1ct50f9fc6c1f0903bf@mail.gmail.com> <4B9A91DA.7030107@FreeBSD.org> <3bbf2fe11003200523t60895bfv1fa73d04e58a7838@mail.gmail.com> <4BA5C746.7060203@FreeBSD.org> <3bbf2fe11003300725vdb1e4ddrf112778ca2bbbc20@mail.gmail.com> <4BB20BF0.3090605@feral.com> Date: Tue, 30 Mar 2010 16:43:50 +0200 X-Google-Sender-Auth: 04c913a1c373e0b9 Received: by 10.142.67.22 with SMTP id p22mr2663816wfa.179.1269960230605; Tue, 30 Mar 2010 07:43:50 -0700 (PDT) Message-ID: <3bbf2fe11003300743k7045d986rec439ad292f2743d@mail.gmail.com> From: Attilio Rao To: Matthew Jacob Content-Type: text/plain; charset=UTF-8 Cc: freebsd-scsi@freebsd.org Subject: Re: How is supposed to be protected the units list? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2010 14:43:55 -0000 2010/3/30 Matthew Jacob : > > I was distracted yesterday so didn't finish my testing. > > There are still lots of issues that can occur. I'm still forming some > thoughts on this, but part of the problem is that there are things going on > with a periph that make this difficult. Pieces of it can change or be > changed- even under a lock- but the code surrounding the lock isn't aware > that it can change *between* the lock. For example, I think that cam_periph > alloc can have two different arrivals of something which could be for the > same periph can end up with two different periph structures on the list with > different unit numbers that point to the same bus. It doesn't matter that > there were locks to provide some stability because the locks were dropped in > between. May you please refer precisely to current code snippets (in terms of functions, file, line, etc) in order to better explain this and the other issues, when you have time? Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein