In the openzfs meeting today, the topic of ZoL portability issues was
raised. Since I've been porting a lot of the ZoL work back to illumos, I
have some notes on a few different things I've run into.

- Code uses a Linux errno (EREMOTEIO) that is not available in illumos
kernel.

- SPL cv_timedwait_sig_hires is global, static in illumos kernel.

- ZoL sys/zfs_context.h defines cv_timedwait_sig_hires as cv_timedwait_hires
  which has a different semantic on illumos (this shouldn't have to be
  defined at all if cv_timedwait_sig_hires was static in the SPL and code
used
  one of the public functions). There are several other cv_*_sig functions
  defined in zfs_context.h which use the non-signal cv_wait versions. It
seems
  like this will lead to different behavior across OSes and encourages
  developers to think incorrectly about interruptible vs. non-interruptible
code.

- The ZoL cv_*_sig definitions have a void return type so nothing attempts
to
  warn about the unchecked return value. This can lead to a tight loop in
the
  kernel on platforms where a Unix signal interrupts the cv.

- SPL sys/sysmacros.h includes sys/debug.h, illumos sys/sysmacros.h does
not.
  The SPL copy also includes several other headers which are not in the
illumos
  version, so this could lead to unintended incompatibility issues over
time.

- SPL extended assert.h with a macro not in illumos (ASSERTV).
-- this one seems like something we should look at adding to illumos

Let me know if there are any questions on these notes.

Thanks,
Jerry

------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T6a783ef79cc1cfe3-Mfb8be71697a8c4f15fd209d1
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription

Reply via email to