Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Apr 2013 02:51:43 +0100
From:      "Steven Hartland" <killing@multiplay.co.uk>
To:        "matt" <sendtomatt@gmail.com>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: r249939+ not detecting ata trim
Message-ID:  <33B1A5523E9949278464E92CC6BB722E@multiplay.co.uk>
References:  <517C3C87.1020005@gmail.com> <37582339ED1A4356B6DE6142B2FBCD7B@multiplay.co.uk> <517C7969.4090501@gmail.com> <D77B488FB5184A149D672AB9440612FD@multiplay.co.uk> <517C7E4B.1030501@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <ATA_TRIM(*),UNMAP,WS16>

    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--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?33B1A5523E9949278464E92CC6BB722E>