Solaris recently introduced the idea of drive topology because
where a drive is located does matter. I have already handled
this with udev/blkid integration under Linux so I'm hopeful
this case can simply be removed but for now I've just stubbed
out what is needed in libspl and commented out the rest here.
The upstream ZFS code has correctly moved to a faster native sha2
implementation. Unfortunately, under Linux that's going to be a little
problematic so we revert the code to the more portable version contained
in earlier ZFS releases. Using the native sha2 implementation in Linux
is possible but the API is slightly different in kernel version user
space depending on which libraries are used. Ideally, we need a fast
implementation of SHA256 which builds as part of ZFS this shouldn't be
that hard to do but it will take some effort.
This is a portability change which removes the dependence of the Solaris
thread library. All locations where Solaris thread API was used before
have been replaced with equivilant Solaris kernel style thread calls.
In user space the kernel style threading API is implemented in term of
the portable pthreads library. This includes all threads, mutexs,
condition variables, reader/writer locks, and taskqs.
The major change is removing the thread pool when importing devices.
This may be reintroduced at some point if needed, but it is added
complexity which has already been handled by blkid on modern Linux
systems. We only need to fallback to probing everything is /dev/
if you config file is toast and even then it only takes a few seconds.
Added print_timestamp() compatibility function, this will be needed
long term but it's a simply enough addition.
Added Solaris style label functions. This was done simply to aid in
the initial update to onnv_141. I'm hopeful that after more careful
inspection all of this can be removed and we can integrate with a
more Linux friendly Solution without breaking any compatibility.
Added several missing headers which are required by the updated
version of ZFS. As usual I just add empty headers if needed because
it's easier than tracking the change against the core ZFS code.
Added SEC, MILLISEC, MICROSEC defines if unavailable.
Added missing xuio structure and typedefs. I'm hopeful these can
be removed as well once we crack the zero-copy nut under Linux.
Almost exclusively this patch handled the addition of another char
array to the zfs_cmd_t structure. Unfortunately c90 doesn't allow
zero filling the entire struct with the '= { 0 };' shorthand.