Re: fsid change of ZFS?
On Thu, 25 Aug 2011, Hiroki Sato wrote:
>
> My opinion is using a hash function which occurs no collision in the
> well-known names is sufficient for our purpose because the number of
> file systems on a running system is small anyway and not changed
> frequently in most cases. I am not sure which function is best;
> fnv_32_str() seemed better against a large data set but it is not
> likely to have >30 file systems, for example.
This was a large part of my reasoning when proposing a hash table
initially -- there are 256 (maybe 255 if you want to reserve one) slots,
and only 14 or so filesystems currently in the tree. It seems very
unlikely that any single machine would ever have more than another five
out-of-tree filesystem types on it (right?), so putting 20 items into 250
hash bins is a pretty good chance of being collision-free.
-Ben
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 26 之 35 篇):