Date: Thu, 10 Mar 2005 09:24:11 +0300 From: Andrey Chernov <ache@nagual.pp.ru> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: current@FreeBSD.ORG Subject: Re: [TEST(/review)] major/minor/devname fix Message-ID: <20050310062410.GA27497@nagual.pp.ru> In-Reply-To: <3527.1110404418@critter.freebsd.dk> References: <3527.1110404418@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050310062410.GA27497>