From owner-svn-src-all@freebsd.org Thu Nov 17 01:35:11 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 06B71C45686; Thu, 17 Nov 2016 01:35:11 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mail-ua0-x242.google.com (mail-ua0-x242.google.com [IPv6:2607:f8b0:400c:c08::242]) (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 B43E398D; Thu, 17 Nov 2016 01:35:10 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by mail-ua0-x242.google.com with SMTP id b35so13297714uaa.1; Wed, 16 Nov 2016 17:35:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=1iHB/T4/OM7X2dsYOAv0uuIJBCb3J3NYmM3gH4WZbVA=; b=RSroiCxF10mP+1oLRycwsUJT6fTgDm4TbHmFN2qjgjGx7xyxY8+UXkPbBK6Ycf3NY4 b3t6s3PVwPbJCjRECDFMpFwRRQ9lnKWohe/qrpWT6bZUkwwpsHPblLszCEYnsewR1U/k GknyPuOLhpnMC1KgjYQcjyJ+oX1AffPzQyl8mHXJCyWJwvTkcY6fZcMuIdjSmA5RURLG v9TvX9TKTy3u9B3wEJA0yRCWkgcJZbz1uDd4T0gricM5u/GNtagRtJQHy9FxI+0TY3ip UC203t5lei/MiG4+TwSGyy3cBaAJGpSXZb5EiI9chbb9bIlFCRMY5rJOVw9jcZE011wn Oeeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=1iHB/T4/OM7X2dsYOAv0uuIJBCb3J3NYmM3gH4WZbVA=; b=CS4gYfzMUNvc4RNtKrUMEjeoq5Uk4vS+tk3xi/24s/l0EZap+IY8RQj6nzGuwAqocS ocblP+zASv26WBDWMmvNO9jiaSAJUms8oPH1aWTlE6KbEhPI4+HghFMlUbYqOIeHS5t2 HaO5wINOy7WJ2d7iRRS6Tnv5EXTbcm3r8Z4YQ0czytyc2s8NlJYx+uHFqTwWTQJxjuCC 8QOimOO8XcmIt9GEDB53Q1hM6bwqfCqtgS6m2W83VcILzp+88kWWKlSjlR/fDGgDYy6h f4xatCsX4W0CsFi1llXQtChvgklfsbPg6K6BE/yY27eCP2D89RR2wC3ty3d6dt6uaHG6 htOA== X-Gm-Message-State: AKaTC02yNH3DhA7X2epJE1y/L/SCqvvPsQD2I0GEY320FZwQDQc9DelN1HMB2IUt+GtyeVPgvHNSwzinRwqGBw== X-Received: by 10.159.49.11 with SMTP id m11mr327321uab.178.1479346509491; Wed, 16 Nov 2016 17:35:09 -0800 (PST) MIME-Version: 1.0 Sender: sepherosa@gmail.com Received: by 10.159.36.247 with HTTP; Wed, 16 Nov 2016 17:35:08 -0800 (PST) In-Reply-To: <20161116221440.GA83880@wkstn-mjohnston.west.isilon.com> References: <201611150236.uAF2aCV8015106@repo.freebsd.org> <20161116221440.GA83880@wkstn-mjohnston.west.isilon.com> From: Sepherosa Ziehau Date: Thu, 17 Nov 2016 09:35:08 +0800 X-Google-Sender-Auth: Dlk5Fv7wQZvxay7xROGUO3Sd6Oo Message-ID: 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... To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 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: Thu, 17 Nov 2016 01:35:11 -0000 On Thu, Nov 17, 2016 at 6:14 AM, Mark Johnston wrote: > 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" Thank you for the patch! I will handle it today! -- Tomorrow Will Never Die