Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265689AbUADNXt (ORCPT ); Sun, 4 Jan 2004 08:23:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265693AbUADNXt (ORCPT ); Sun, 4 Jan 2004 08:23:49 -0500 Received: from kweetal.tue.nl ([131.155.3.6]:58884 "EHLO kweetal.tue.nl") by vger.kernel.org with ESMTP id S265689AbUADNXs (ORCPT ); Sun, 4 Jan 2004 08:23:48 -0500 Date: Sun, 4 Jan 2004 14:21:11 +0100 From: Andries Brouwer To: Linus Torvalds Cc: Andries Brouwer , Rob Love , rob@landley.net, Pascal Schmidt , linux-kernel@vger.kernel.org, Greg KH Subject: Re: udev and devfs - The final word Message-ID: <20040104142111.A11279@pclin040.win.tue.nl> References: <1072972440.3975.29.camel@fur> <20040103040013.A3100@pclin040.win.tue.nl> <20040103141029.B3393@pclin040.win.tue.nl> <20040104000840.A3625@pclin040.win.tue.nl> <20040104034934.A3669@pclin040.win.tue.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from torvalds@osdl.org on Sat, Jan 03, 2004 at 07:04:17PM -0800 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1901 Lines: 45 On Sat, Jan 03, 2004 at 07:04:17PM -0800, Linus Torvalds wrote: > I agree that for a stable kernel we should then go back to "best effort" > mode, where for simple politeness reasons we should try to keep device > numbers as stable as we can. Good - you understand now. So, the right setup - you call it politeness, I call it quality of implementation - is to have both stable names and stable numbers, in as many cases as possible. Concerning the names, we are in reasonable shape. We have nameif that binds a stable name to a MAC address. Much beter than eth2. Also udev is a good step in the right direction - it gives stable names under certain circumstances. (And since udev can use the kernel device number, it can give stable names under more circumstances when the kernel device number is more often stable.) Concerning the numbers, numbers based on enumeration are less than satisfactory - they must be the last fallback when nothing else can be found. And the ordering then is the ordering in time. Almost always something better can be found. It is the drivers' job to invent the device number. For the important special case of SCSI or IDE disk, the disk serial number can be used. Our helper function takes a string and an integer and a range, and produces a device number in the given range, distinct from already existing numbers. If you prefer random device numbers you make this function ignore the string argument. I prefer stable device numbers so would do an md5sum-like thing. And that brings us back to the start of this thread: Life is simpler when there is more room. So it is a pity that we chose for less room. Andries - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/