When probing /dev/ for validing ZFS devices to import skip floppy
block devices. There's no reason to waste time checking these
devices even though they are valid block devices. Plus, we had
one system get stuck on I/O errors probing the device.
end_request: I/O error, dev fd0, sector 0
Buffer I/O error on device fd0p120, logical block 0
end_request: I/O error, dev fd0, sector 8
Buffer I/O error on device fd0p120, logical block 1
With the update to onnv_141 how minor devices were created and
removed for ZVOL was substantially changed. The updated system
is much more tightly integrated with Solaris's /dev/ filesystem.
This is great for Solaris but bad for Linux.
This patch keeps as much of those changes as possible which as
useful for Linux. But it also reverts back to use the old system
of explicit minor node creation via a decicated ioctl(). This
worked well in zfs-0.4.9 and it should continue to work well.
The ZFS update to onnv_141 brought with it support for a
security label attribute called mlslabel. This feature
depends on zones to work correctly and thus I am disabling
it under Linux. Equivilant functionality could be added
at some point in the future.
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.
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.
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.