rod_widdowson: " you are aware that a driver is actually a DLL so you can link one driver against another and just call across"
Oh that interesting, and wouldn’t be so bad perhaps.
Peter_Viscarola_(OSR): " I don’t understand enough about what you’re trying to accomplish to be able to provide better advice. But I would suggest a solid architectural foundation before “just writing some code”
Porting ZFS from Sun Microsystems, and from a Unix POV it is very well designed and has solid architectural foundation. Personally, I think it would be difficult to find a better designed filesystem, albeit perhaps biased.
It is difficult to describe how it is designed in this forum, and probably beyond your interests as well.
http://wiki.lustre.org/images/4/49/Beijing-2010.2-ZFS_overview_3.1_Dilger.pdf
ZFS takes all the physical disks you have, and puts them in a storage pools in whatever redundancy you want (mirror/raidz1-3, compression, dedup), and is handled as part of the DMU layer (Data Management Unit). Technically there are 2 consumers of the DMU, the ZPL (ZFS Posix Layer -ie, filesystems you mount and use as files and directories) that consume storage in the pool as “ZFS Datasets”, and is mounted as a file-system.
And then there is ZVOL, which consumes storage space and represents it as a raw device (virtual disk), to do with as you please (ntfs, fat, iscsi export etc).
When it comes to porting, I started at the very bottom (physical disks on Windows, IO etc) so it can have a pool for the DMU. Then at the very other end, implemented FSD for the “ZFS Datasets” to be mounted as Volumes on windows.
Note that “ZFS Dataset” filesystems is only ever on DMU storage space. They do not go on regular disks “on its own” like FAT/NTFS. If you had a disk you want ZFS on, you would create a pool on it, and DMU, which then gets a “ZFS Dataset”, and you can create your files.
So now I’m working on the 2nd DMU consumer, ZVOLs, that is presented to Windows as a virtual disk.
I guess technically, I should have done 1 driver for the physical disks, pool and all the way to DMU, then 2 adjacent consumer drivers for ZPL and ZVOL which directly talk to DMU, and present to Windows as either a mounted “ZFS Dataset” FSD Volume, or miniport virtual disk.
Windows is unfamiliar to me, and hence I am hoping to get advice from glorious Windows devs on how they would do things, on what Windows can and can not do. It has been quite fun to work on this port, and quite a few things in Windows was a big surprise.
https://openzfsonosx.org/wiki/Windows_port