From owner-freebsd-fs@freebsd.org Mon Dec 5 09:25:09 2016 Return-Path: Delivered-To: freebsd-fs@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 8E7D3C671E8 for ; Mon, 5 Dec 2016 09:25:09 +0000 (UTC) (envelope-from honzhan@microsoft.com) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0120.outbound.protection.outlook.com [104.47.33.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29FAC1CE7 for ; Mon, 5 Dec 2016 09:25:08 +0000 (UTC) (envelope-from honzhan@microsoft.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=B4VocbBYt3MXiGLrnInWJXBn+yRu6oLS4DPpDI1KoQ8=; b=JpMPmk2uaFH3vrDjKQSEWHR85xx/sL/uTzIX2+Ea4Mom/CxMMvhzTK+wVLTjU02cblfYZiFRpklef+HLuoE36PFpuhMJJ4SHzo8O7NC29dSXX/bshP587w0hP2Y9Whp7wcwwNhTC6st8esuLZBJ9S3gTOIJ+sBxLcUnRnrDt2Qg= Received: from CY1PR03MB1517.namprd03.prod.outlook.com (10.163.17.23) by CY1PR03MB1520.namprd03.prod.outlook.com (10.163.17.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Mon, 5 Dec 2016 07:50:50 +0000 Received: from CY1PR03MB1517.namprd03.prod.outlook.com ([10.163.17.23]) by CY1PR03MB1517.namprd03.prod.outlook.com ([10.163.17.23]) with mapi id 15.01.0761.016; Mon, 5 Dec 2016 07:50:50 +0000 From: Hongjiang Zhang To: "freebsd-fs@FreeBSD.org" Subject: zfs suspend/resume Thread-Topic: zfs suspend/resume Thread-Index: AdJOy0GE970q4n8+T2ei3l7QseNlxQ== Date: Mon, 5 Dec 2016 07:50:49 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=honzhan@microsoft.com; x-originating-ip: [2404:f801:9000:19::28d] x-ms-office365-filtering-correlation-id: 6ef83d13-0f9b-45fb-3a6f-08d41ce36e63 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR03MB1520; x-microsoft-exchange-diagnostics: 1; CY1PR03MB1520; 7:1wRtUaNIBZ3jrsmh+CPmfkSmIQ63877ckF5Gtr7zgrdaGGogbLGmgDG65Qzg92Fdb4T+0TsB7OmuTS0uiPx1bg6Mn4ueBawglyQgUejo7rEhGnceqMpDVL3XtsGZVBWI1v5mppFo8dVS0V8vlpO5aU16JbNyJWC9pWFrVXOmdgzLDnV2vMgqpnENgBHE85obwlfSk2Z6PGPiwthDFvchFSGLNjuhpRq6EpKAB8l96rXX3o4njSsqnYzWUmxf2anKwpaxhqBS+UbBaU3fSsNxJOcqDdODIXZ8TAbGQyxQ1xWPsCLhsTZ2WZzvUXi+qq8cLe0+7r+vst3ipqW7v2mr9hhlIgjmAmM3NR5gnoCODmwnjAofsIy9McVgVPQ8pREZLc29tXyblgo8VgPIfWy1rFGlFtclQFCZA2Ue/3+KeBzOmoBPsOue/VWvkS7y+JiQ2uN+Oc7+xKZMmr3+FI7fgs+6mfCVN4rFjXjxoBM/cs4= x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(21748063052155); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(20161123558021)(6072148)(6047074); SRVR:CY1PR03MB1520; BCL:0; PCL:0; RULEID:; SRVR:CY1PR03MB1520; x-forefront-prvs: 0147E151B5 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(189002)(199003)(2906002)(81156014)(106356001)(7846002)(7736002)(101416001)(2351001)(50986999)(99286002)(86612001)(54356999)(105586002)(8990500004)(5640700002)(5005710100001)(8676002)(6506006)(76576001)(39850400001)(97736004)(10290500002)(5660300001)(39450400002)(39410400001)(77096006)(38730400001)(107886002)(189998001)(86362001)(2501003)(7696004)(450100001)(10090500001)(3660700001)(122556002)(3280700002)(9686002)(6116002)(9326002)(5630700001)(6916009)(68736007)(8936002)(92566002)(74316002)(2900100001)(33656002)(790700001)(102836003)(39840400001)(81166006)(110136003)(39860400001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR03MB1520; H:CY1PR03MB1517.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Dec 2016 07:50:49.9811 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1520 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Dec 2016 09:25:09 -0000 Hi, I want to implement a feature to freeze/thaw the ZFS filesystem through zfs= _suspend/zfs_resume. This is used for FreeBSD in Hyper-V: Hyper-V supports = VSS (Volume Shadow Copy), and it requires the VM running on Hyper-V to supp= ort filesystem Freeze/Thaw. I found zfs_ioc_rollback has invoked zfs_suspend_fs and zfs_resume_fs. But = either zfs_suspend_fs or zfs_resume_fs was exposed to userland. I don't und= erstand why zfs_suspend_fs/zfs_resume_fs cannot be used through zfs_ioctl. = Anyone know? Or is it reasonable to add zfs_ioc_suspend and zfs_ioc_resume? Thanks Hongjiang Zhang