]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r346759: loader: implement map-vdisk and unmap-vdisk commands
authorKyle Evans <kevans@FreeBSD.org>
Thu, 24 Oct 2019 03:57:56 +0000 (03:57 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Thu, 24 Oct 2019 03:57:56 +0000 (03:57 +0000)
commit4eb1d3f48866840728931d5928ad7cee2e3622b5
tree11bb3b11cfea2edb81ee3968224d1983b93d0ae0
parent7c7ef3e8f9f2309430d171f93e3cb85f463e87e6
MFC r346759: loader: implement map-vdisk and unmap-vdisk commands

illumos update: https://www.illumos.org/issues/10598

Add map-vdisk and unmap-vdisk commands to create virtual disk interface on
top of file. This will allow to use disk image from file system to load and
start the kernel.

By mapping file, we create vdiskX device, the device will be listed by lsdev
[-v] and can be accessed directly as ls vdisk0p1:/path or can be used as
value for currdev variable.

vdisk strategy function does not use bcache as we have bcache used with
backing file. vdisk can be unmapped when all consumers have closed the open
files.

In first iteration we do not support the zfs images because zfs pools do
keep the device open (there is no "zpool export" mechanism). Adding zfs
support is relatively simple, we just need to run zfs disk probe after
mapping is done.
stand/common/help.common
stand/common/vdisk.c [new file with mode: 0644]
stand/efi/loader/conf.c
stand/i386/loader/conf.c
stand/loader.mk