From nobody Fri May 03 14:47:42 2024 X-Original-To: dev-commits-src-all@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 4VWDDZ6LkQz5K7s7; Fri, 3 May 2024 14:47:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VWDDZ5qQLz4wpN; Fri, 3 May 2024 14:47:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714747662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5JSD7VqReKaw3dr5eMcsEvPqPE9aACNUimDSjWcbQm0=; b=kq5LFxoUgQQZYXsngUrOCc0sDQl0AtllcJA6aX3L1EfLAqH03dw9rj4bFj7XeO89jEJd8Y bm2bBYPtcePk3MPgA1GV2CMmD5RbbzLjOHEaz7OKWaeNDEtttsWQHFFeZUGTsDk6p79Rul pMO2SGdDVbbPX/Dm6hHQu8BrzDff4ajULUOhcLNyb004tYw7QXe/iR2ua8ydp/zMINoiCL 8qIrP19cwEGjSt/hIiOJrU22Ba/7zv6Uant+q5XTvpYXxaaEGeT1cHsmhq21j87p6U5w/C Ny7xzIcZ58Eb6CNnwNgGR7bsqjFgFRlbo0g9bE/n+CFaDS11hphxQsP1CVGBsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714747662; a=rsa-sha256; cv=none; b=u7Wrb8Y1vHfUtyY0Sjk/uZWRWalAdnNTPJkWD/No2rTsOGh/dqrWFUDuCPVJeUJ5TB2bpb RGm0/pbAbTV8paBrawJPRfuUx7qJkAH5Vf5veDHqrw2I950aROmx8efZ1z/qMDaKDxL8zr aoPAs28IwDEtugLvzpqopev12mH+WZv9WxCHwhJF4PTPKaG4DczhZnR1LEaeCym7/hv79w 4jdT8P3NeWwxVo0uOrmiZU4RBlxSeDLEeCyxOxTZ8sYrRdW4QjMzvh+ra//y1W1n4SUNx0 SajBrFUZMM4PCkUXaMOGqUN8E25BCjEfu6Dbh8UW+NgF3aD9BoQoWwdNwEOVOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714747662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5JSD7VqReKaw3dr5eMcsEvPqPE9aACNUimDSjWcbQm0=; b=iGAtOxj8JszRG28/P5XnJGBXwgdCOuki4jbbENctE+0A4Y6WDhPWtIgMtUx3arip6uafwm 5SO5V3OqBvFcgsxUIyG+/BdHkwBhvCNGyZ6d4eOGFu3KIVdMTWKiWCBiAztO0aM8Eektsv FzVuykmpyKKom/bNgUdCiUB/B3kVjNdH42G1QupoBQ31IlDt2a8R9v3FlU6qYq35U+atbS n9eeQE9T5X7M/nODC3OqbIiJo9TAjwMwCmkbHIVJ8n9RRL7rocLWi/G2KOmHFgou8Vft+3 Wl7GOBGJ3H1IC/UVnVy/QKqGAd5Qv2uEPS20IRef403zPcAblBIIMJpa4+74iA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VWDDZ5JZgzqGc; Fri, 3 May 2024 14:47:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 443Elg7K051269; Fri, 3 May 2024 14:47:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 443ElgZj051266; Fri, 3 May 2024 14:47:42 GMT (envelope-from git) Date: Fri, 3 May 2024 14:47:42 GMT Message-Id: <202405031447.443ElgZj051266@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 12117d0e9314 - main - da: Update trim stats for WRITE SAME and ATA TRIM List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 12117d0e9314d1706508386c1c49ace2de578b31 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=12117d0e9314d1706508386c1c49ace2de578b31 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 = DA_CCB_DELETE; ccb->ccb_h.flags |= CAM_UNLOCKED; + softc->trim_count++; + softc->trim_ranges += ranges; + softc->trim_lbas += 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 = DA_CCB_DELETE; ccb->ccb_h.flags |= CAM_UNLOCKED; + softc->trim_count++; + softc->trim_ranges++; + softc->trim_lbas += count; cam_iosched_submit_trim(softc->cam_iosched); }