Date: Wed, 24 Aug 2011 11:21:19 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Pawel Jakub Dawidek <pjd@freebsd.org> Cc: Benjamin Kaduk <kaduk@MIT.EDU>, Rick Macklem <rmacklem@uoguelph.ca>, current@freebsd.org Subject: Re: fsid change of ZFS? Message-ID: <20110824082119.GJ17489@deviant.kiev.zoral.com.ua> In-Reply-To: <20110823212301.GE1697@garage.freebsd.pl> References: <20110823151041.GA1697@garage.freebsd.pl> <1614657395.247867.1314130280524.JavaMail.root@erie.cs.uoguelph.ca> <20110823212301.GE1697@garage.freebsd.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
--Sm8tznmXhqMF9oN0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 23, 2011 at 11:23:03PM +0200, Pawel Jakub Dawidek wrote: > On Tue, Aug 23, 2011 at 04:11:20PM -0400, Rick Macklem wrote: > > Pawel Jakub Dawidek wrote: > > > On Tue, Aug 23, 2011 at 10:09:41AM -0400, Rick Macklem wrote: > > > > Ok, I'll admit I wasn't very fond of a fixed table that would > > > > inevitably > > > > get out of date someday, either. > > > > > > > > I didn't think hashing for the cases not in the table was worth the > > > > effort, > > > > but doing a hash instead of a table seems reasonable. > > > > > > > > I see that ZFS only uses the low order 8 bits, so I'll try and come > > > > up > > > > with an 8bit hash solution and will post a patch for testing/review > > > > soon. > > > > > > > > I don't think the vfs_sysctl() is that great a concern, given that > > > > it > > > > appears to be deprecated already anyhow. (With an 8bit hash, > > > > vfs_typenum > > > > won't be that sparse.) I'll also make sure that whatever hash I use > > > > doesn't collide for the current list of file names (although I will > > > > include > > > > code that handles a collision in the patch). > > >=20 > > > Sounds great. Thanks! > > >=20 > > Here's the patch. (Hiroki could you please test this, thanks, rick.) > > ps: If the white space gets trashed, the same patch is at: > > http://people.freebsd.org/~rmacklem/fsid.patch >=20 > The patch is fine by me. Thanks, Rick! Sorry, I am late. It seems that the probability of the collisions for the hash is quite high. Due to the fixup procedure, the resulting typenum will depend on the order of the module initialization, isn't it ? IMO, it makes the patch goal not met. --Sm8tznmXhqMF9oN0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk5UtH4ACgkQC3+MBN1Mb4hWpwCghA4kC9ojHrWXH5hlBZyYbdk+ DncAni6QrkO3EihSbIoDaT1aFjt4Gmqt =Fh7T -----END PGP SIGNATURE----- --Sm8tznmXhqMF9oN0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110824082119.GJ17489>