From owner-freebsd-hackers@freebsd.org Sat Nov 24 16:09:06 2018 Return-Path: Delivered-To: freebsd-hackers@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 6711D1152E81 for ; Sat, 24 Nov 2018 16:09:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E13727F29E; Sat, 24 Nov 2018 16:09:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::d1da:f838:7f36:60b7] (unknown [IPv6:2001:470:7a58:0:d1da:f838:7f36:60b7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1DA371D7A1; Sat, 24 Nov 2018 17:09:04 +0100 (CET) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_7F4FE982-8BC1-4DE9-874D-A8A01FD3FE8B"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: TRIM utility Date: Sat, 24 Nov 2018 17:08:59 +0100 In-Reply-To: Cc: Warner Losh , FreeBSD Hackers , Poul-Henning Kamp , Lev Serebryakov , "Rodney W. Grimes" , Eugene Grosbein To: Wojciech Puchar References: <201811231600.wANG0wHc083199@pdx.rh.CN85.dnsmgr.net> X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: E13727F29E X-Spamd-Result: default: False [2.28 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_SHORT(0.64)[0.642,0]; NEURAL_SPAM_MEDIUM(0.86)[0.865,0]; NEURAL_SPAM_LONG(0.78)[0.777,0]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Nov 2018 16:09:06 -0000 --Apple-Mail=_7F4FE982-8BC1-4DE9-874D-A8A01FD3FE8B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 24 Nov 2018, at 15:44, Wojciech Puchar wrote: >=20 >> Yes. It would. That's hard with the current storage stack to do via = the >> disk interface. And often the underlying protocols do not support = partial >> ranges. There is no good way to do this with buf/bio interface we = have. So >=20 > what is an actual difference between "secure erase" and trimming whole = disk? It depends a lot on the device. Some devices encrypt all blocks automatically, and a Secure Erase command might just throw away the key, not go over all the data and actively wipe it. Most SSDs will likely also trim all the blocks to be erased, since users have come to expect the SSD performance to go back to the 'out of box' level, after such an operation. If you are lucky, the manufacturer's documentation will explain the specifics, but don't count on it. :) -Dimitry --Apple-Mail=_7F4FE982-8BC1-4DE9-874D-A8A01FD3FE8B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCW/l3mwAKCRCwXqMKLiCW o7nAAJ0Z3FrogUA0TA5b3k8KEPQ0jgoZ5QCeOOWf/uPoOyIaykndtARE8vw7xwI= =yOxB -----END PGP SIGNATURE----- --Apple-Mail=_7F4FE982-8BC1-4DE9-874D-A8A01FD3FE8B--