From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Date: Tue, 03 Apr 2012 20:25:42 +0000 Subject: Re: [PATCH] path_id: Re-introduce SAS phy enumeration of devices v2 Message-Id: <4F7B5CC6.5010108@suse.de> List-Id: References: <1333371414-412-1-git-send-email-nils.carlson@ericsson.com> In-Reply-To: <1333371414-412-1-git-send-email-nils.carlson@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: linux-hotplug@vger.kernel.org On 04/03/2012 08:24 PM, Kay Sievers wrote: > On Tue, Apr 3, 2012 at 10:04, Nils Carlson wrote: > >> This patch reintroduces enumeration >> of the form >> >> pci-0000:05:00.0-sas-phy0-0x500000e114de2b42:0-lun0 >> >> where phy0 is the reintroduced substring where 0 corresponds >> to the lowest phy identifier on the port to which the device >> is connected. > > Without having any real insight knowledge, a quick check: > > We usually refuse any "find the lowest number approach" in new code, > and require the kernel to export a stable instance number per parent > device, which is entirely disconnected from any global device > enumeration counter or prober ordering. > > Almost all existing examples doing that are broken, and some even > needed to be removed because they just blindly bet on luck that things > are always in the same probe order. > > Many device can individually unbound and rebound in the kernel, so > after the rebind the same device will no longer have a smaller number > like it had before. Kernel enumeration is only in a very few cases > useful to build persistent paths. > > The approach in this case is safe against individual pieces being > unregistered and registered again? > Note, this is just a first step towards real configuration. This is the SAS PHY issue we've talked about earlier; eventually we'll have to export paths for all phys. I'm working on a patch (on top of this one), but it'll be quite a change to path_id. So I've asked for this patch to be sent now, rather than wait for the full blown solution. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)