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). > > > > > > Sounds great. Thanks! > > > > > 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 > > 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.
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:17 UTC