summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-12-29 05:32:34 +0000
committersephe <sephe@FreeBSD.org>2016-12-29 05:32:34 +0000
commit0199187072d2a08a17ce9054437c5af475f33b03 (patch)
tree2ab2583372afcb30587e791afe620efb68f6030e /include
parent29d62d335696779c326bbf2b2d969334a75faadf (diff)
downloadFreeBSD-src-0199187072d2a08a17ce9054437c5af475f33b03.zip
FreeBSD-src-0199187072d2a08a17ce9054437c5af475f33b03.tar.gz
MFC 308664,308742,308743
308664 hyperv/vss: Add driver and tools for VSS VSS stands for "Volume Shadow Copy Service". Unlike virtual machine snapshot, it only takes snapshot for the virtual disks, so both filesystem and applications have to aware of it, and cooperate the whole VSS process. This driver exposes two device files to the userland: /dev/hv_fsvss_dev Normally userland programs should _not_ mess with this device file. It is currently used by the hv_vss_daemon(8), which freezes and thaws the filesystem. NOTE: currently only UFS is supported, if the system mounts _any_ other filesystems, the hv_vss_daemon(8) will veto the VSS process. If hv_vss_daemon(8) was disabled, then this device file must be opened, and proper ioctls must be issued to keep the VSS working. /dev/hv_appvss_dev Userland application can opened this device file to receive the VSS freeze notification, hold the VSS for a while (mainly to flush application data to filesystem), release the VSS process, and receive the VSS thaw notification i.e. applications can run again. The VSS will still work, even if this device file is not opened. However, only filesystem consistency is promised, if this device file is not opened or is not operated properly. hv_vss_daemon(8) is started by devd(8) by default. It can be disabled by editting /etc/devd/hyperv.conf. Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: kib, mckusick Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8224 308742 hyperv/vss: Nuke unused variables. Submitted by: markj Reported by: markj Sponsored by: Microsoft 308743 hyperv/vss: Install the userland daemon to /usr/sbin instead of / Submitted by: markj Reported by: markj Sponsored by: Microsoft
Diffstat (limited to 'include')
-rw-r--r--include/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/Makefile b/include/Makefile
index 449cdf4..b5214e8 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -44,7 +44,7 @@ LDIRS= bsm cam geom net net80211 netatalk netgraph netinet netinet6 \
LSUBDIRS= cam/ata cam/scsi \
dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \
- dev/hwpmc \
+ dev/hwpmc dev/hyperv \
dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/nvme \
dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \
dev/speaker dev/utopia dev/vkbd dev/wi \
@@ -161,7 +161,7 @@ copies:
done
.endif
.endfor
-.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS}
+.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/hyperv:Ndev/nand:Ndev/pci} ${LSUBSUBDIRS}
cd ${.CURDIR}/../sys; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
${DESTDIR}${INCLUDEDIR}/$i
@@ -184,6 +184,9 @@ copies:
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 nand_dev.h \
${DESTDIR}${INCLUDEDIR}/dev/nand
.endif
+ cd ${.CURDIR}/../sys/dev/hyperv/utilities; \
+ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 hv_snapshot.h \
+ ${DESTDIR}${INCLUDEDIR}/dev/hyperv
cd ${.CURDIR}/../sys/dev/pci; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 pcireg.h \
${DESTDIR}${INCLUDEDIR}/dev/pci
@@ -256,7 +259,7 @@ symlinks:
ln -fs ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \
done
.endfor
-.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/nand:Ndev/pci}
+.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/hyperv:Ndev/nand:Ndev/pci}
cd ${.CURDIR}/../sys/$i; \
for h in *.h; do \
ln -fs ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \
@@ -284,6 +287,11 @@ symlinks:
${DESTDIR}${INCLUDEDIR}/dev/nand; \
done
.endif
+ cd ${.CURDIR}/../sys/dev/hyperv/utilities; \
+ for h in hv_snapshot.h; do \
+ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/hyperv/utilities/$$h \
+ ${DESTDIR}${INCLUDEDIR}/dev/hyperv; \
+ done
cd ${.CURDIR}/../sys/dev/pci; \
for h in pcireg.h; do \
ln -fs ../../../../sys/dev/pci/$$h \
OpenPOWER on IntegriCloud