From owner-freebsd-current@FreeBSD.ORG Sun Apr 28 01:51:16 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EBB9464A for ; Sun, 28 Apr 2013 01:51:16 +0000 (UTC) (envelope-from prvs=18303b5217=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 777F212BC for ; Sun, 28 Apr 2013 01:51:15 +0000 (UTC) Received: from r2d2 ([46.65.172.4]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50003518298.msg for ; Sun, 28 Apr 2013 02:51:13 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Sun, 28 Apr 2013 02:51:13 +0100 (not processed: message from valid local sender) X-MDDKIM-Result: neutral (mail1.multiplay.co.uk) X-MDRemoteIP: 46.65.172.4 X-Return-Path: prvs=18303b5217=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-current@FreeBSD.org Message-ID: <33B1A5523E9949278464E92CC6BB722E@multiplay.co.uk> From: "Steven Hartland" To: "matt" References: <517C3C87.1020005@gmail.com> <37582339ED1A4356B6DE6142B2FBCD7B@multiplay.co.uk> <517C7969.4090501@gmail.com> <517C7E4B.1030501@gmail.com> Subject: Re: r249939+ not detecting ata trim Date: Sun, 28 Apr 2013 02:51:43 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0464_01CE43BB.51199720" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: freebsd-current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Apr 2013 01:51:17 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0464_01CE43BB.51199720 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit ----- Original Message ----- From: "matt" >> FYI: Change only requires kernel, world would be identical, which >> should save you some time. > > And some untrimmed deletes! > > Thanks, with geom/cam/disk stuff I usually assume that it could affect > userland out of caution. > > BTW...ata identify is working fine, as even before the patch camcontrol > identify indicated trim support. Could you confirm the output you got from the debug as I would have expected to see UNMAP supported on your machine if you mps? I can envisage people wanting to know what delete methods are detected as supported so I've created a new little patch which will print this out from a verbose boot. Its attached if you want to try it, again only a kernel change, I'd be interested in the output you get. You should see something like:- da0: Delete methods: Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. ------=_NextPart_000_0464_01CE43BB.51199720 Content-Type: application/octet-stream; name="cam-scsi-delete-verbose.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="cam-scsi-delete-verbose.patch" --- sys/cam/scsi/scsi_da.c.orig 2013-04-28 00:22:33.312129712 +0000=0A= +++ sys/cam/scsi/scsi_da.c 2013-04-28 01:40:58.118450753 +0000=0A= @@ -3058,6 +3057,30 @@=0A= =0A= free(ata_params, M_SCSIDA);=0A= dadeletemethodchoose(softc, DA_DELETE_NONE);=0A= + if (bootverbose) {=0A= + char buf[80];=0A= + int sep;=0A= +=0A= + snprintf(buf, sizeof(buf), "Delete methods: <");=0A= + sep =3D 0;=0A= + for (i =3D DA_DELETE_MIN; i <=3D DA_DELETE_MAX; i++) {=0A= + if (softc->delete_available & (1 << i)) {=0A= + if (sep) {=0A= + strlcat(buf, ",", sizeof(buf));=0A= + } else {=0A= + sep =3D 1;=0A= + }=0A= + strlcat(buf, da_delete_method_names[i],=0A= + sizeof(buf));=0A= + if (i =3D=3D softc->delete_method) {=0A= + strlcat(buf, "(*)", sizeof(buf));=0A= + }=0A= + }=0A= + }=0A= + strlcat(buf, ">", sizeof(buf));=0A= + printf("%s%d: %s\n", periph->periph_name,=0A= + periph->unit_number, buf);=0A= + }=0A= softc->state =3D DA_STATE_NORMAL;=0A= /*=0A= * Since our peripheral may be invalidated by an error=0A= ------=_NextPart_000_0464_01CE43BB.51199720--