History log of /freebsd-current/stand/common/vdisk.c
Revision Date Author Comments
# 3e15b01d 22-Feb-2024 Warner Losh <imp@FreeBSD.org>

libsa: Remove redundant sys/cdefs.h

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 8337ab69 30-Nov-2022 Warner Losh <imp@FreeBSD.org>

stand: For all disk drivers, connect dv_parsedev to disk_parsedev

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D37339


# ad759c73 11-Aug-2022 Warner Losh <imp@FreeBSD.org>

stand: Add disk_fmtdev for dv_fmtdev for all the disk devices

All of the archsw fmtdev functions treat DEVT_DISK as a call to
disk_fmtdev. Set all disks' dv_fmtdev to disk_fmtdev so devformat
will return the same thing.

Sponsored by: Netflix
Reviewed by: tsoome (prior version)
Differential Revision: https://reviews.freebsd.org/D35917


# e98f952c 27-Jul-2022 Warner Losh <imp@FreeBSD.org>

stand: Make sure nobody has a NULL pointer for dv_cleanup

dv_cleanup is specified almost everywhere. Use nullsys instead of NULL
to indicate 'do nothing'. Also, be consistent in trailing commas that
were missing before.

Sponsored by: Netflix
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D35913


# 68031519 13-Dec-2019 Toomas Soome <tsoome@FreeBSD.org>

loader: vdisk dereference after free

print out the information and then free the memory used.

MFC after: 1 week


# 4914ee11 26-Apr-2019 Toomas Soome <tsoome@FreeBSD.org>

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.

Differential Revision: https://reviews.freebsd.org/D19733