-
-
Notifications
You must be signed in to change notification settings - Fork 609
Open
Labels
Description
The ZFS filesystem driver is implemented as a shared library libsolaris.so. It is 800K in size, and more importantly, it implements many features that are of little if any use on a unikernel.
More specifically, the following features can be disabled/commented out:
- support for not used vdevs - "file", "missing", "raidz", "hole", "spare", "replacing"
- support for dynamically adding/removing vdevs
- support for l2arc and spares (see
spa_add_spares()andspa_add_l2cache()for example) drivers/zfs.ccand zfs_ioctl should only be used by zfs_builder- adjust some macros like
VERIFYinbsd/sys/cddl/contrib/opensolaris/uts/common/sys/debug.hto deflate rodata
I propose we disable these features with relevant ifdefs and potentially enhance the build process to produce two versions of libsolaris.so:
- slimmed down for use in regular runtime image
- full one (or at least with
drivers/zfs.ccand zfs_ioctl) for use by zfs_builder
The work-in-progress branch can be found here: https://github.com/wkozaczuk/osv/tree/zfs_slim, where I managed to shrink libsolaris.so to 576 KB in size.