Difference between revisions of "Platform code differences"

Jump to navigation Jump to search
m
Line 43: Line 43:
= osxzfs =
= osxzfs =


* Mostly based on ZFSOnLinux source tree
* Mostly based on ZFSOnLinux
* Uses ZFSOnLinux autoconf
** Clone of source tree
** Uses ZFSOnLinux autoconf
* Prefers clang or llvm-gcc for kernel module
* Prefers clang or llvm-gcc for kernel module
* IOKit kernel module requires C++ (strip Linux's variables named ''private'')
** 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
* 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
* 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'''
* '''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
** 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
* 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''' 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.
** '''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