Hi. I thought I''d take a stab at the first steps of porting ZFS to Darwin. I realize there are rumors that Apple is already doing this, but my contact at Apple has yet to get back to me to verify this. In the meantime, I wanted to see how hard it would be. I started with libzfs, and promptly ran into issues with libnvpair. It wants sys/nvpair.h, but I can''t find that in the http://svn.genunix.org/repos/on/trunk/ tree. Could someone please point me in the right direction? Thanks! -- This messages posted from opensolaris.org
Hi, That file is in /on/trunk/usr/src/uts/common/sys/nvpair.h Check out OpenGrok at http://src.opensolaris.org If you put sys/nvpair.h in the "File Path" field, it will tell you where you can find the file (the correct version is in the /onnv/onnv-gate/ subtree). That site is immensely useful, I use it all the time when porting ZFS to FUSE. You should also check out http://www.opensolaris.org/os/community/zfs/porting/ if you haven''t seen it yet. Keep us posted with your progress :) On Thursday 16 November 2006 01:24, Rick Mann wrote:> Hi. I thought I''d take a stab at the first steps of porting ZFS to Darwin. > I realize there are rumors that Apple is already doing this, but my contact > at Apple has yet to get back to me to verify this. In the meantime, I > wanted to see how hard it would be. I started with libzfs, and promptly ran > into issues with libnvpair. > > It wants sys/nvpair.h, but I can''t find that in the > http://svn.genunix.org/repos/on/trunk/ tree. > > Could someone please point me in the right direction? Thanks! > -- > This messages posted from opensolaris.org > _______________________________________________ > zfs-code mailing list > zfs-code at opensolaris.org > http://opensolaris.org/mailman/listinfo/zfs-code
Hi, On Thursday 16 November 2006 19:19, Rick Mann wrote:> I''ve noticed there are two nvpair_alloc_system.c files. One, in > libnvpair, is dated 2004. The other, in nvpair, is dated 2006 and has > more code in it. > > Which one is the right one?If you search for nvpair_alloc_system.c in OpenGrok, there will be 3 results under /onnv/onnv-gate/: /onnv/onnv-gate/usr/src/lib/libnvpair/ - libnvpair - name-value pair library /onnv/onnv-gate/usr/src/stand/lib/nvpair/ - Stand-alone (booting) code /onnv/onnv-gate/usr/src/uts/common/os/ - Core Operating System The description OpenGrok gives you after the directory should give you some hints as to the version you should use. So, since you are porting the libnvpair userspace library, you should use the file in /usr/src/lib/libnvpair. You will notice that OpenSolaris has more or less the following structure: /usr/src/lib: Userspace libraries. /usr/src/cmd: Userspace programs. /usr/src/uts: Kernel code. /usr/src/common: Code which is common to userspace and kernel. In case you''ll still have some doubts, I have put my OpenSolaris file copy script at http://www.wizy.org/files/copysolaris.sh If you take a look at that script, you''ll see all the files that you might need in porting ZFS (except the kernel part, which I haven''t finished porting yet). Have fun ;)
Reasonably Related Threads
- dedup source code
- mount.ocfs2: Invalid argument while mounting /dev/mapper/xenconfig_part1 on /etc/xen/vm/. Check 'dmesg' for more information on this error.
- [PATCH] 1. changes for vdiskadm on illumos based platform
- Are recursive snapshot destroy and rename atomic too?
- libzfs zfs_create() fails on sun4u daily bits (daily.1110)