From owner-freebsd-current@FreeBSD.ORG Thu Mar 10 06:24:13 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 925C716A4CE for ; Thu, 10 Mar 2005 06:24:13 +0000 (GMT) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id B342143D1F for ; Thu, 10 Mar 2005 06:24:12 +0000 (GMT) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.13.3/8.13.3) with ESMTP id j2A6OBHj027608; Thu, 10 Mar 2005 09:24:11 +0300 (MSK) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.13.3/8.13.3/Submit) id j2A6OBng027607; Thu, 10 Mar 2005 09:24:11 +0300 (MSK) (envelope-from ache) Date: Thu, 10 Mar 2005 09:24:11 +0300 From: Andrey Chernov To: Poul-Henning Kamp Message-ID: <20050310062410.GA27497@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Poul-Henning Kamp , current@FreeBSD.ORG References: <3527.1110404418@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3527.1110404418@critter.freebsd.dk> User-Agent: Mutt/1.5.8i X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-3; AVE: 6.30.0.5; VDF: 6.30.0.24; host: nagual.pp.ru) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (nagual.pp.ru [0.0.0.0]); Thu, 10 Mar 2005 09:24:11 +0300 (MSK) cc: current@FreeBSD.ORG Subject: Re: [TEST(/review)] major/minor/devname fix X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2005 06:24:13 -0000 On Wed, Mar 09, 2005 at 10:40:18PM +0100, Poul-Henning Kamp wrote: > +dev_t > +dev2udev(struct cdev *x) > +{ > + if (x == NULL) > + return (NODEV); > + return (x->si_inode ^ devfs_random()); > +} ... > + dp = devfs_itod(ud ^ devfs_random()); Why you try to use randomization here instead of sequental ordering (or reversing/shifting it)? In such small number of bits there is a big probability of collisions may occurse. -- http://ache.pp.ru/