Concerns over shim-layers for ZFS and kernel/userland namespace pollution

Garrett Cooper yanegomi at gmail.com
Sun Jan 23 01:06:07 UTC 2011


Hi Pawel,
    I've been trying to get rid of the time.h pollution in sys/time.h
for POSIX conformance and I've run into a bit of a roadblock
(referring to sys/cddl/compat/opensolaris/sys/time.h):
    1. The clock_gettime call in gethrtime() can fail and the failure
itself isn't captured.
    2. The calls in many case assume userland behavior, being "return
value", not "return errno, assign value to address passed in"
    3. AFAICT the calls shouldn't be calling the clock_gettime syscall
interface from userland; they should be calling the clock_gettime
interface. I could be partly wrong here, but if so then some
additional hacking will need to be made to pull in time.h as that's
where clock_gettime must be defined according to our manpages and
POSIX. There might be another preexisting KPI that can be used in its
place.
    I haven't looked outside of that header for now.
    Comments on my above statements are more than welcome.
Thanks,
-Garrett


More information about the freebsd-fs mailing list