From owner-freebsd-fs@FreeBSD.ORG Fri Aug 5 04:47:40 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFDFA106564A for ; Fri, 5 Aug 2011 04:47:40 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta09.westchester.pa.mail.comcast.net (qmta09.westchester.pa.mail.comcast.net [76.96.62.96]) by mx1.freebsd.org (Postfix) with ESMTP id 5C7A58FC08 for ; Fri, 5 Aug 2011 04:47:39 +0000 (UTC) Received: from omta08.westchester.pa.mail.comcast.net ([76.96.62.12]) by qmta09.westchester.pa.mail.comcast.net with comcast id GUkX1h0020Fqzac59Ungzk; Fri, 05 Aug 2011 04:47:40 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta08.westchester.pa.mail.comcast.net with comcast id GUnT1h00X1t3BNj3UUnUZC; Fri, 05 Aug 2011 04:47:29 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 05A79102C19; Thu, 4 Aug 2011 21:47:26 -0700 (PDT) Date: Thu, 4 Aug 2011 21:47:26 -0700 From: Jeremy Chadwick To: Steven Hartland Message-ID: <20110805044725.GA48395@icarus.home.lan> References: <13BEC27B17D24D0CBF2E6A98FD3227F3@multiplay.co.uk> <20110728012437.GA23430@icarus.home.lan> <20110728103234.GA33275@icarus.home.lan> <20110728145917.GA37805@icarus.home.lan> <2A07CD8AE6AE49A5BAED59A7E547D1F9@multiplay.co.uk> <2D117F9F212A4CCBA6B7F51E8705BDB7@multiplay.co.uk> <20110805033001.GA47366@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110805033001.GA47366@icarus.home.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@FreeBSD.ORG Subject: Re: Questions about erasing an ssd to restore performance under FreeBSD X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2011 04:47:40 -0000 On Thu, Aug 04, 2011 at 08:30:01PM -0700, Jeremy Chadwick wrote: > I can put that patch up on the web, but be aware it's more of a "hack" > because /usr/include/sys/ata.h needs certain bits added to it, which I > just defined in camcontrol.c for the time being. There's also user > interface pieces which are half-written which I need to remove. I > wouldn't want people patching their camcontrol for this functionality > with a half-ass patch is what I'm saying. :-) I've cleaned up the patch (removed the half-written usage stuff) and made it available. http://jdc.parodius.com/freebsd/camcontrol_ata_security/ If this is committed to base the #define ATA_SECURITY_* entries should be moved into include/sys/ata.h. Steve, if you want to put up your patch somewhere I can review it, but an official review from someone more familiar with CAM (e.g. mav@) would be best. I'm also not sure how you implemented all the features, UI-wise (command-line-argument-wise). This is what I came up with, from my internal docs, with comparative syntax in Linux hdparm: NOTE: Should try to avoid using -C, -E, -n, -t, -u, or -v camcontrol security -U -p PWD == unlock (--security-unlock PWD) camcontrol security -S -p PWD == set password (--security-set-pass PWD) camcontrol security -D -p PWD == disable (--security-disable PWD) camcontrol security -X -p PWD == erase (--security-erase PWD) camcontrol security -Z -p PWD == enhanced erase (--security-erase-enhanced PWD) camcontrol security -i TYPE ... == {user,master} (--user-master USER) -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |