From owner-svn-src-all@freebsd.org Wed Nov 16 22:08:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63E1CC45197; Wed, 16 Nov 2016 22:08:59 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt0-x229.google.com (mail-qt0-x229.google.com [IPv6:2607:f8b0:400d:c0d::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA841644; Wed, 16 Nov 2016 22:08:59 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt0-x229.google.com with SMTP id c47so117644444qtc.2; Wed, 16 Nov 2016 14:08:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UzflFff2bAwNCaBkW4CdkcHWGekz+x+vWEqfb+56zMI=; b=FEePmXplbv19EIwE5bR0sHTGWq6MEGUZfn/QEPpdhlspIlXeBFWFlF8NTfeArqxiV6 qmekAPyQfOUIsWSHhFO+57mCSmx+dod/BDuTZrITqR7W6gHxOcMCaxRJmHVlS5R5GYn2 37GUr+uvlmC3m0LMV6wv82c0rtmxtFAL2hItXi0bpFATmNpD+OYWcO9WH0Tj4etshxI+ kHWczi8L82DIM6uFUWsxG/lhPCX06DCmbwZADjFvwDA7/H2KtUO4NC7ydGNiHNVb73vQ MJtVFA6IGfI6OWY13NFDT+UU7D29UulyjxZrCmS/SJtsC47Gtv2wp9WZEz6Lh6I0e6gb xd4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=UzflFff2bAwNCaBkW4CdkcHWGekz+x+vWEqfb+56zMI=; b=IwkBHw5JWV7dxW4E+Vk42O2kKh4dHzvjFie/ihTocyxK6gD/n+F1P7+SiOi2+G2fV2 CZz5Gg7/gVavTXszlB2Gu2BgUqNEeVBOm47BPklxm26A73uOtC++UAFUPBqLdOIEkkNs o2eWIjWzPf4gzMf87YG7qFGFU4caW3d4+cvC81qqOx7uegtrUvNHZ6VUEtbYTwW8M4Q+ MVM80GsOkAGifkorQrJtTDSXw1oN2B5d3ZsO7MkMMq7ZnzsKJ4xAhHVVX4S1THnIhj5r iKINu146fdbi9fYnVo/qRB0PSYpTQlS2CZFx/VWuvNU0eAOnQ44XBEIF9HLNJ54Z4T+j jwGg== X-Gm-Message-State: ABUngveCqaZ+xK0VTzYb8cmE4ZU8fZAcXReCb9wmrw0JMNN+lNlcunwmsVEh3sCfvUOjgQ== X-Received: by 10.237.36.114 with SMTP id s47mr3951430qtc.221.1479334138107; Wed, 16 Nov 2016 14:08:58 -0800 (PST) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id t17sm12221839qtc.36.2016.11.16.14.08.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Nov 2016 14:08:57 -0800 (PST) Sender: Mark Johnston Date: Wed, 16 Nov 2016 14:14:40 -0800 From: Mark Johnston To: Sepherosa Ziehau Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r308664 - in head: contrib/hyperv/tools etc/devd etc/mtree include share/man/man4 sys/conf sys/dev/hyperv/utilities sys/modules/hyperv/utilities usr.sbin/hyperv usr.sbin/hyperv/tools us... Message-ID: <20161116221440.GA83880@wkstn-mjohnston.west.isilon.com> References: <201611150236.uAF2aCV8015106@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201611150236.uAF2aCV8015106@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2016 22:08:59 -0000 On Tue, Nov 15, 2016 at 02:36:12AM +0000, Sepherosa Ziehau wrote: > Author: sephe > Date: Tue Nov 15 02:36:12 2016 > New Revision: 308664 > URL: https://svnweb.freebsd.org/changeset/base/308664 > > Log: > 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 > Reviewed by: kib, mckusick > MFC after: 3 weeks > Sponsored by: Microsoft > Differential Revision: https://reviews.freebsd.org/D8224 > > Added: > head/contrib/hyperv/tools/hv_vss_daemon.8 > head/contrib/hyperv/tools/hv_vss_daemon.c > head/share/man/man4/hv_vss.4 (contents, props changed) > head/sys/dev/hyperv/utilities/hv_snapshot.c (contents, props changed) > head/sys/dev/hyperv/utilities/hv_snapshot.h (contents, props changed) > head/usr.sbin/hyperv/tools/kvp/ > head/usr.sbin/hyperv/tools/kvp/Makefile > - copied, changed from r308663, head/usr.sbin/hyperv/tools/Makefile > head/usr.sbin/hyperv/tools/kvp/Makefile.depend > - copied unchanged from r308663, head/usr.sbin/hyperv/tools/Makefile.depend > head/usr.sbin/hyperv/tools/vss/ > head/usr.sbin/hyperv/tools/vss/Makefile (contents, props changed) > head/usr.sbin/hyperv/tools/vss/Makefile.depend (contents, props changed) > Deleted: > head/usr.sbin/hyperv/tools/Makefile > head/usr.sbin/hyperv/tools/Makefile.depend > Modified: > head/etc/devd/hyperv.conf > head/etc/mtree/BSD.include.dist > head/include/Makefile > head/share/man/man4/Makefile > head/sys/conf/files.amd64 > head/sys/conf/files.i386 > head/sys/modules/hyperv/utilities/Makefile > head/usr.sbin/hyperv/Makefile This appears to install hv_kvp_daemon and hv_vss_daemon to / instead of /usr/sbin, and breaks the -DNO_ROOT build. I think a Makefile.inc is needed in usr.sbin/hyperv/tools in order to preserve BINDIR from usr.sbin/Makefile.inc. I fixed the problem in my tree with the diff below, but am not sure if this is the right way to do it. For some reason, doing this resulted in unused var warnings compiling hv_vss_daemon.c. diff --git a/contrib/hyperv/tools/hv_vss_daemon.c b/contrib/hyperv/tools/hv_vss_daemon.c index 8b58bc9..a1ba98d 100644 --- a/contrib/hyperv/tools/hv_vss_daemon.c +++ b/contrib/hyperv/tools/hv_vss_daemon.c @@ -158,10 +158,9 @@ main(int argc, char* argv[]) struct pollfd hv_vss_poll_fd[1]; uint32_t op; - int ch, r, len, error; + int ch, r, error; int hv_vss_dev_fd; - int freeze_thaw = UNDEF_FREEZE_THAW; while ((ch = getopt(argc, argv, "dnh")) != -1) { switch (ch) { case 'n': diff --git a/usr.sbin/hyperv/Makefile.inc b/usr.sbin/hyperv/tools/Makefile.inc similarity index 60% rename from usr.sbin/hyperv/Makefile.inc rename to usr.sbin/hyperv/tools/Makefile.inc index edb0129..7e09f32 100644 --- a/usr.sbin/hyperv/Makefile.inc +++ b/usr.sbin/hyperv/tools/Makefile.inc @@ -1,4 +1,4 @@ # $FreeBSD$ CFLAGS.gcc+= -Wno-uninitialized -.include "../Makefile.inc" +.include "../../Makefile.inc"