From nobody Fri May 03 15:25:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VWF3s5ZVGz5KC0x for ; Fri, 3 May 2024 15:25:13 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VWF3s3yZDz55jR for ; Fri, 3 May 2024 15:25:13 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a51addddbd4so1182701566b.0 for ; Fri, 03 May 2024 08:25:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1714749912; x=1715354712; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9AR+oLdNGHwZ5UemtcMlxW4NNma4JR8kCfMCkw1ZSc0=; b=s7EC4qRGmfOovo077bhzj/KpayvrPb7eHgYs1/h29C3C997m9ym+pJwWcQ5nEq//FO 8iqvEbYoUVf5dmxhBtKlIoC137+/IWT7oGfE/OaBNJNnOm7kCjL8+DprGePc3Gox4XfW aKQlXia06O7hwa6VBKHpmzyjlxjro5TSHk1Kx2M5MocUnhpIEMhgdD7pXNDn0jobk/5S a3aQNfBHpFfh/r5o/08dvxH/lBFIYD3TJ5Px5jc5TF08DTX8tOv/uy1eoX+TyPBUCHuN fOCkTiGgR6UA2ZE/yB50EnxCM2FBbb9ig2J1JyKhM6PD9vCLRfZxU4AiOYvMeZYuz2kw IiKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714749912; x=1715354712; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9AR+oLdNGHwZ5UemtcMlxW4NNma4JR8kCfMCkw1ZSc0=; b=bhhqW+p6tmoFsoc3ClhXRhXxQVjBHdUffrUCGM+Y99iM0jkT+rnjSKQj1Ef1MomsYX tWbJvv+FnCmBL8wQcV2Ix7PJQcYX13lUlyX2CIGpSF0S3AnEldJpRPfUMEsGtpjkPiOY E0fj+YiLSqLoThVRIkvmpgO7n/rz4g9DlEjieRbXsHIlcmUcVSP/mCZhlkajHJa+K02+ GjYjTKSK69KxM0LWCgDaJlfpjQ6oMgQKmVmEcSJSa7E67zu6EgSkwD1V3h6S01KpL3Qo fkrLlEPZ9jhJTIHAjCYseY/ueyUysmyjq1xemTp994isFvlIK0kVmExw3pnfGsqOwGhi kbqw== X-Forwarded-Encrypted: i=1; AJvYcCU5489PZ3+CbMBQ8ToBnOdYlq9yVA4bqGbX4cfMdY7LaiAiJxzZGVyK/bWpQmoG8Cuw+LJW5D13k6oGcWw1hmtFDybMotfc+jBM3qg3+2pIaA== X-Gm-Message-State: AOJu0Yxu0CINCSPX8ZRxYo+cwQy7rg+qv7niscHmhWbC2Lb2t35qPcY5 cSZEDpkuHxzb73k1voM4pLJTUDjm5jrEbtF6qOKQ0R5tnkRm/ZoFIWci93gkJV+/nUA8o0DMiRn aaIvroNYeOMd2V04zt9JGIutsOH1atHfYS0vSJw== X-Google-Smtp-Source: AGHT+IGE7W2IYM/A8HWO1sakO35lP6sr5ZjvOcYpDn4Fkq8UJxKMzj6tUr2m7J+Vos/mttssjkHd4aI9ot0VyXzw1HI= X-Received: by 2002:a17:906:4f0f:b0:a58:e569:1242 with SMTP id t15-20020a1709064f0f00b00a58e5691242mr1674316eju.4.1714749912020; Fri, 03 May 2024 08:25:12 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202405031447.443ElgZj051266@gitrepo.freebsd.org> <1010899452.10421.1714749653185@localhost> In-Reply-To: <1010899452.10421.1714749653185@localhost> From: Warner Losh Date: Fri, 3 May 2024 09:25:00 -0600 Message-ID: Subject: Re: git: 12117d0e9314 - main - da: Update trim stats for WRITE SAME and ATA TRIM To: Ronald Klop Cc: Warner Losh , dev-commits-src-all@freebsd.org, src-committers@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000006295d406178e53a1" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4VWF3s3yZDz55jR --0000000000006295d406178e53a1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 3, 2024 at 9:21=E2=80=AFAM Ronald Klop w= rote: > Are you sure you used the right PR? > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277637 > "[NEW PORT] security/enc: Modern and friendly CLI alternative to GnuPG" > Doh! Should have used 277673. Warner > > > Regards, > Ronald. > > > > *Van:* Warner Losh > *Datum:* vrijdag, 3 mei 2024 16:47 > *Aan:* src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, > dev-commits-src-main@FreeBSD.org > *Onderwerp:* git: 12117d0e9314 - main - da: Update trim stats for WRITE > SAME and ATA TRIM > > The branch main has been updated by imp: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D12117d0e9314d1706508386c1c49ace= 2de578b31 > > commit 12117d0e9314d1706508386c1c49ace2de578b31 > Author: Matthew Grooms > AuthorDate: 2024-05-03 14:41:05 +0000 > Commit: Warner Losh > CommitDate: 2024-05-03 14:46:59 +0000 > > da: Update trim stats for WRITE SAME and ATA TRIM > > The scsi UNMAP path updated trim stats in the da sysctl, but the ATA > TRIM passthru and WRITE SAME paths did not. Add code so they do. > > PR: 277637 > Reviewed by: imp (tweaked WS path to update ranges) > --- > sys/cam/scsi/scsi_da.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c > index 9b3d706d6168..0daaff9229b0 100644 > --- a/sys/cam/scsi/scsi_da.c > +++ b/sys/cam/scsi/scsi_da.c > @@ -4208,6 +4208,9 @@ da_delete_trim(struct cam_periph *periph, union ccb > *ccb, struct bio *bp) > da_default_timeout * 1000); > ccb->ccb_h.ccb_state =3D DA_CCB_DELETE; > ccb->ccb_h.flags |=3D CAM_UNLOCKED; > + softc->trim_count++; > + softc->trim_ranges +=3D ranges; > + softc->trim_lbas +=3D block_count; > cam_iosched_submit_trim(softc->cam_iosched); > } > > @@ -4268,6 +4271,9 @@ da_delete_ws(struct cam_periph *periph, union ccb > *ccb, struct bio *bp) > da_default_timeout * 1000); > ccb->ccb_h.ccb_state =3D DA_CCB_DELETE; > ccb->ccb_h.flags |=3D CAM_UNLOCKED; > + softc->trim_count++; > + softc->trim_ranges++; > + softc->trim_lbas +=3D count; > cam_iosched_submit_trim(softc->cam_iosched); > } > > > ------------------------------ > > > > --0000000000006295d406178e53a1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, May 3, 2024 at 9:21=E2=80=AFA= M Ronald Klop <ronald-lists@klop= .ws> wrote:

Doh! Should have used 277673. </doh!>

Warner


Regards,
Ronald.


=C2=A0

Van: Warner Losh <imp@FreeBSD.org>
Datum: vrijdag, 3 mei 2024 16:47
Aan: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, de= v-commits-src-main@FreeBSD.org
Onderwerp: git: 12117d0e9314 - main - da: Update trim stats for WRIT= E SAME and ATA TRIM

The branch main has been updated by i= mp:

URL:
https://cgit.FreeBSD.org/src/com= mit/?id=3D12117d0e9314d1706508386c1c49ace2de578b31

commit 12117d0e9314d1706508386c1c49ace2de578b31
Author: =C2=A0=C2=A0=C2=A0=C2=A0Matthew Grooms <mgrooms@shrew.net>
AuthorDate: 2024-05-03 14:41:05 +0000
Commit: =C2=A0=C2=A0=C2=A0=C2=A0Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-03 14:46:59 +0000

=C2=A0=C2=A0=C2=A0=C2=A0da: Update trim stats for WRITE SAME and ATA TRIM =C2=A0=C2=A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0The scsi UNMAP path updated trim stats in the da sy= sctl, but the ATA
=C2=A0=C2=A0=C2=A0=C2=A0TRIM passthru and WRITE SAME paths did not. Add cod= e so they do.
=C2=A0=C2=A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0PR: 277637
=C2=A0=C2=A0=C2=A0=C2=A0Reviewed by: imp (tweaked WS path to update ranges)=
---
=C2=A0sys/cam/scsi/scsi_da.c | 6 ++++++
=C2=A01 file changed, 6 insertions(+)

diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 9b3d706d6168..0daaff9229b0 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -4208,6 +4208,9 @@ da_delete_trim(struct cam_periph *periph, union ccb *= ccb, struct bio *bp)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0da_default_timeout * 1000);
=C2=A0=C2=A0=C2=A0=C2=A0ccb->ccb_h.ccb_state =3D DA_CCB_DELETE;
=C2=A0=C2=A0=C2=A0=C2=A0ccb->ccb_h.flags |=3D CAM_UNLOCKED;
+ =C2=A0=C2=A0softc->trim_count++;
+ =C2=A0=C2=A0softc->trim_ranges +=3D ranges;
+ =C2=A0=C2=A0softc->trim_lbas +=3D block_count;
=C2=A0=C2=A0=C2=A0=C2=A0cam_iosched_submit_trim(softc->cam_iosched);
=C2=A0}
=C2=A0
@@ -4268,6 +4271,9 @@ da_delete_ws(struct cam_periph *periph, union ccb *cc= b, struct bio *bp)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0da_= default_timeout * 1000);
=C2=A0=C2=A0=C2=A0=C2=A0ccb->ccb_h.ccb_state =3D DA_CCB_DELETE;
=C2=A0=C2=A0=C2=A0=C2=A0ccb->ccb_h.flags |=3D CAM_UNLOCKED;
+ =C2=A0=C2=A0softc->trim_count++;
+ =C2=A0=C2=A0softc->trim_ranges++;
+ =C2=A0=C2=A0softc->trim_lbas +=3D count;
=C2=A0=C2=A0=C2=A0=C2=A0cam_iosched_submit_trim(softc->cam_iosched);
=C2=A0}
=C2=A0
=C2=A0


=C2=A0
--0000000000006295d406178e53a1--