From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout.rz.uni-frankfurt.de (mailout.rz.uni-frankfurt.de [141.2.22.233]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Wed, 13 Jan 2010 17:19:11 +0100 (CET) Received: from smtpauth.cluster.uni-frankfurt.de ([10.2.22.4] helo=smtpauth2.rz.uni-frankfurt.de) by mailout.rz.uni-frankfurt.de with esmtp (Exim 4.69) (envelope-from ) id 1NV5w7-0004kc-BU for dm-crypt@saout.de; Wed, 13 Jan 2010 17:19:11 +0100 Received: from ada-03.ghl40.whgl.uni-frankfurt.de ([141.2.119.133]) by smtpauth2.rz.uni-frankfurt.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NV5vQ-0004dz-Dr for dm-crypt@saout.de; Wed, 13 Jan 2010 17:18:28 +0100 Message-ID: <4B4DF253.5040201@whgl.uni-frankfurt.de> Date: Wed, 13 Jan 2010 17:18:27 +0100 From: Sven Eschenberg MIME-Version: 1.0 References: <20100110151659.GA2635@tansi.org> <20100110194904.GA5194@tansi.org> <4B4A3989.7050004@redhat.com> <20100113070157.GA13730@maude.comedia.it> <1263378036.3529.3.camel@Koma-Station.localdomain> <20100113131320.GA3993@tansi.org> In-Reply-To: <20100113131320.GA3993@tansi.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] renaming of device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Hi Arno, Indeed cryyptsetup traverses /dev stating each file for major:minor and stops on the first match - at least a trace suggests this. The question is though, if this is an appropriated approach. One thing that annoys me when doing this: There's no guarantee that device inodes are in /dev, nor links to it. In theory it cann be any place in the filesystem. there can be as many links as you want and as many inodes for the same device, as you want. Regards -Sven Arno Wagner schrieb: > Having had a bit of time to think about it, it seems that > it would indeed be necessary to store the device name. > > A possible alternative is to traverse all of /dev/ and > report all devices that match major/minor. This may be > the solution causing the least effort, as cryptsetup > is doing something like it already, just that it currently > stops after the first match. > > In fact, I think I prefer for it to report all devices > that match. > > Arno > > > On Wed, Jan 13, 2010 at 11:20:36AM +0100, Sven Eschenberg wrote: >> Hi Luca, >> >> I doubt this is possible. The only possible thing would be: Modify DM, >> when a device name is passed in, to keep the passed in name alongside >> the actual major:minor and provide an IOCTL, to access the information. >> >> Regards >> >> -Sven >> >> >> On Wed, 2010-01-13 at 08:01 +0100, Luca Berra wrote: >>> On Sun, Jan 10, 2010 at 09:33:13PM +0100, Milan Broz wrote: >>>> The algorithm is very simple (and was probably written before >>>> udev was used so these special links in /dev did not exist). >>>> >>>> So it need to add some preferred names and not print the first entry. >>>> >>>> Please can you add an issue to project pages to not forget about this? >>>> Probably good idea to fix it in next minor release. >>> it could be useful to have the functionality in device-mapper itself, >>> instead of duplicating in dm-crypt, lvm, dmraid, whatever ? >>> >>> Regards, >>> L. >>> >> >> _______________________________________________ >> dm-crypt mailing list >> dm-crypt@saout.de >> http://www.saout.de/mailman/listinfo/dm-crypt >> >