Difference between revisions of "Platform code differences"

Jump to navigation Jump to search
no edit summary
m (Clarify xattr=sa)
Line 40: Line 40:
* [https://github.com/zfsonlinux/spl/commit/46a75aadb7c08085a4ad2e55dcf5b6fb387c1253 cv_wait_io()]
* [https://github.com/zfsonlinux/spl/commit/46a75aadb7c08085a4ad2e55dcf5b6fb387c1253 cv_wait_io()]
** Compatibility layer extension to hook into Linux's I/O time accounting infrastructure. Otherwise identical to cv_wait().
** Compatibility layer extension to hook into Linux's I/O time accounting infrastructure. Otherwise identical to cv_wait().
= osxzfs =
* Mostly based on ZFSOnLinux source tree
* Uses ZFSOnLinux autoconf
* Prefers clang or llvm-gcc for kernel module
* IOKit kernel module requires C++ (strip Linux's variables named ''private'')
* All UIO operations are kernel API calls. (uio_create() / uio_setoffset() ... ) the struct is opaque
* zfs_vnops.c, zfs_vfops.c, zfs_acl.c, zfs_znode.c, zfs_fuid.c are FreeBSD based with OSX wrappers in zfs_vnops_osx.c
* '''vnode_t''' is defined as '''struct vnode *''' on OSX, so most variables are now defined as '''struct vnode *vp'''
* All vnode operations have API calls (vnode_fsnode(vp) == vp->v_data). the struct is opaque
* zvols are mostly untouched from FreeBSD, but calls wrappers to IOKit C++ layer
* '''vnode_create''' needs ALL information at call time (vtype, private ptr (znode), vnode_ops), can not pre-alloc like FreeBSD
** '''vnode_create''' can call both '''reclaim''' and '''fdsync''' causing locking issues. OSX port has a reclaim thread to defer reclaims.
Editor
58

edits

Navigation menu