Modern kernel build systems at least post 2.6.16 will set this properly
so we should not. In fact post 2.6.28 the include headers have moved
under arch so the guess we make here is completely wrong. Letting
the kernel build system set this ensure it will be correct. Also
drop the ulimit from the Makefile which, not surprisingly, turns out
to be very non-portable. If your expecting failures set the ulimit
in your shell before kicking off the test suite.
It's still not clear to me why the default value here is large
enough Solaris. I hit this limit again when setting up 120 SATA
drives configured as 15 raidz2 groups each containing 8 drives.
We expect to go bigger so we may just want to spend a little
time and figure out how to make this all dynamic.
SLES10 ships util-linux-2.12r-35.30 which does not support the -f option
to losetup. To avoid this problem the unused_loop_device() function was
added which attempts to find an unused loop device by checking each
/dev/loop* device with losetup to see if it is configured.
The intent here is to fully remove the previous Solaris thread
implementation so we don't need to simulate both Solaris kernel
and user space thread APIs. The few user space consumers of the
thread API have been updated to use the kthread API. In order
to support this we needed to more fully support the kthread API
and that means not doing crazy things like casting a thread id
to a pointer and using that as was done before. This first
implementation is not effecient but it does provide all the
corrent semantics. If/when performance becomes and issue we
can and should just natively adopt pthreads which is portable.
Let me finish by saying I'm not proud of any of this and I would
love to see it improved. However, this slow implementation does
at least provide all the correct kthread API semantics whereas
the previous method of casting the thread ID to a pointer was
dodgy at best.
gcc-unused and gcc-uninit topic branches at the same time and
then ran 'tg update'. I'll need to keep that sort of thing
in mind when updating multiple topic branches between updates.