From owner-freebsd-fs@freebsd.org Mon May 14 20:55:11 2018 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5660E777A7 for ; Mon, 14 May 2018 20:55:10 +0000 (UTC) (envelope-from paul.esson@redstor.com) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0087.outbound.protection.outlook.com [104.47.2.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2456187C6F for ; Mon, 14 May 2018 20:55:09 +0000 (UTC) (envelope-from paul.esson@redstor.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redstorltd.onmicrosoft.com; s=selector1-redstor-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Da5Nn3wXJusIdHqAlZuD/fAzrbScDxpJBKXmyfnIAP4=; b=cYW8VVAmqWhUMZM3T0C6Ewaxl4CROiF1sdNgYFiJ65DoL/Rs9oE2OwQnO7OhOQ53POA8NXJJ4iLylrhPE3RNj3QsNs3VTTJh5kyIbdgjKL1yXvf+wAqX4OvJK43R0UV0GR5CZc/6xexjr53vD3277QBej18xAKbzkyEmuHXAXUw= Received: from HE1PR0102MB2588.eurprd01.prod.exchangelabs.com (10.170.251.141) by HE1PR0102MB3177.eurprd01.prod.exchangelabs.com (10.167.124.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Mon, 14 May 2018 20:55:06 +0000 Received: from HE1PR0102MB2588.eurprd01.prod.exchangelabs.com ([fe80::d508:b6bc:e82:73e]) by HE1PR0102MB2588.eurprd01.prod.exchangelabs.com ([fe80::d508:b6bc:e82:73e%13]) with mapi id 15.20.0755.018; Mon, 14 May 2018 20:55:06 +0000 From: Paul Esson To: Eric Borisch , =?iso-8859-1?Q?Karli_Sj=F6berg?= CC: "freebsd-fs@freebsd.org" Subject: Re: Releasing deleted blocks from a sparse ZVOL Thread-Topic: Releasing deleted blocks from a sparse ZVOL Thread-Index: AdPrmSj1/1GnWlHITtWaBCXmXJBXmQABNnyAAAlZbYAAAJtC6w== Date: Mon, 14 May 2018 20:55:05 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [40.68.209.210] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0102MB3177; 7:1Fml1XCCEdZzU5msybryyzQjTh6QMJnHRvvfoZ/OueOnADx1Ps2Q5FMDbVVfhIU45B+KpsIBwRYS4gHpGGOq1/+BnHvSbRNRLjMX+r0BpLi7BItSsUHHk2A8bJU/PWhBCLfQt0tp4IkPxjKEnR2oaYABSu/H3P7OJR+QoM7O0aofAC4ZsR2h6k64E3lEVu9kt9BZwDbusOtMscH2nGc0z1025158R0aeiqeaFMs6PpWRD2Ppq/Qs2LogZQRiXUGV x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0102MB3177; x-ms-traffictypediagnostic: HE1PR0102MB3177: authentication-results: spf=none (sender IP is ) smtp.mailfrom=paul.esson@redstor.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(85827821059158)(81439100147899); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:HE1PR0102MB3177; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0102MB3177; x-forefront-prvs: 067270ECAF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(376002)(39380400002)(346002)(39850400004)(396003)(189003)(199004)(81166006)(3280700002)(81156014)(486006)(110136005)(86362001)(7736002)(186003)(76176011)(6506007)(33656002)(53546011)(102836004)(7696005)(316002)(3660700001)(14454004)(2906002)(66066001)(2900100001)(8676002)(44832011)(5250100002)(99286004)(8936002)(6436002)(26005)(476003)(68736007)(5890100001)(446003)(105586002)(229853002)(478600001)(106356001)(6116002)(3846002)(4326008)(25786009)(11346002)(6246003)(6306002)(54896002)(9686003)(5660300001)(74316002)(97736004)(55016002)(53936002)(39060400002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0102MB3177; H:HE1PR0102MB2588.eurprd01.prod.exchangelabs.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: redstor.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: pfq2vi70UFcBp+rcPzdohisuDL8VRsbf8DgsrIIMQlEBsBZHk7C57h1nhFIlwF/Ow6/TgCcqVzKZmmQmE6e2OaDslA2XoVX8sAAX5x6vH6mgladG8y3r2aZoRQZUuOhni9WVG/AT2Rr8Rw2W9BIUWzvYCv1DETQLD9kAS3GG4pZUQfZswUNZKS7LGBprphaY spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: a5d026e4-3120-4a36-ab37-08d5b9dcf8e8 X-OriginatorOrg: redstor.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5d026e4-3120-4a36-ab37-08d5b9dcf8e8 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 May 2018 20:55:06.0703 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 24ac53ae-15a7-4211-afef-61d8f34e2571 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0102MB3177 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2018 20:55:11 -0000 Hi Eric, Thanks for your feedback which sounds encouraging. I'll give that a try. Regards, Paul.E Paul Esson | Redstor Limited t +44 (0)118 951 5235 m +44 (0)776 690 6514 e paul.esson@redstor.com ________________________________ From: eborisch@alumni.stanford.edu on behalf= of Eric Borisch Sent: Monday, May 14, 2018 9:37:43 PM To: Karli Sj=F6berg Cc: Paul Esson; freebsd-fs@freebsd.org Subject: Re: Releasing deleted blocks from a sparse ZVOL I've had success in a similar config by attaching the zvol as 'ahci-hd', wh= ich shows up as a 'BHYVE SATA DISK' in a BSD guest. With such a guest (runn= ing a zpool on the attached device): kstat.zfs.misc.zio_trim.failed: 0 kstat.zfs.misc.zio_trim.unsupported: 0 kstat.zfs.misc.zio_trim.success: 179883 kstat.zfs.misc.zio_trim.bytes: 13126696960 Also working with a linux guest. I see the expected tracking of the 'logicalreferenced' size in the host wit= h the ALLOC size in the guest (allowing for upward bias due to using 32k se= ctor sizes on my zvols). Note that TRIM and UNMAP are two extremely similar but distinct (used for S= ATA & SCSI, respectively) commands. Both are commonly referred to as 'trim'= by layers above the device drivers. - Eric