Bring in DIRFS: A filesystem for VKERNELS * What is DIRFS? dirfs is a "filesystem" specific for vkernel(7) which allows mounting host's directories into the vkernel. It runs directly in the vkernel's VFS code, as any other regular filesystem, but it does syscalls (vkernels are userland programs) to retrieve the information needed on every operation requested. Needless to say that the operations that you can perform in the host directories/files depend on the permissions the user that runs the vkernel. For example, you will not be able to 'chflags schg' if you run the vkernel with a regular user instead of root. * How does it work? It basically works like any other filesystem with the difference that you specify the host directory instead of the disk device node. It has its own mount_dirfs command that will be called by the system's mount(8) command when necessary. vkernel64 # mount -t dirfs /usr/src2 /mnt vkernel64 # df -h /mnt Filesystem Size Used Avail Capacity Mounted on dirfs@/usr/src2 47G 36G 12G 75% /mnt Umounting is a normal operation too: vkernel64 # mount | fgrep dirfs dirfs@/usr/src2 on /mnt (dirfs) vkernel64 # umount /mnt * What's the current status? Currently it is in a experimental status, with (probably) many bugs and some parts missing. * Missing stuff - It is not possible to make hardlinks on it yet (VOP_NLINK mising, returns EOPNOTSUPP). - dirfs root for vkernels is not *yet* supported although I expect it to be. - There is no locking on file descriptors between host <-> vkernel.