fsid change of ZFS?
Benjamin Kaduk
kaduk at MIT.EDU
Wed Aug 24 19:24:52 UTC 2011
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
More information about the freebsd-current
mailing list