I spent the weekend reworking libzpool to use libfakekernel. Here's a summary of the changes:
- libzpool is now built in fake-kernel context and uses the taskq API in libfakekernel. Most of the defines in zfs_context.h have been dropped in favour of included system header files. - libfakekernel now provides implementations of many of the functions that were previously being compiled into libzpool (see kernel.c). - mutex_enter/mutex_exit were renamed to kmutex_enter/kmutex_exit to avoid references binding again the versions in libc, which is early testing broke the boot. - libzfs is now built in fake-kernel context and uses the taskq API in libfakekernel. It was also changed to use the kernel mutex/condition API to match libzpool. - zdb, zinject, zhack, ztest all builds in fake-kernel context as well, since they are using zfs_context.h from libzpool and compiling in chunks of zfs kernel code. - various system headers were modified to expose more types/prototypes when _FAKE_KERNEL is defined, along with some missing includes being added to them. I want to stress that this is work in progress. I did make some pthread related changes which I think were a mistake, I'm going to clean that up before submitting this for a formal review. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/openzfs/openzfs/pull/451#issuecomment-342123719 ------------------------------------------ openzfs-developer Archives: https://openzfs.topicbox.com/groups/developer/discussions/T156a07b986390bdb-M56afaad0c2e4cdda370eaae6 Powered by Topicbox: https://topicbox.com