From nobody Mon May 20 20:06:39 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 4VjpVm0tPxz5LKrS; Mon, 20 May 2024 20:06:40 +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 4VjpVm0QfHz4NB9; Mon, 20 May 2024 20:06:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716235600; 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=3knuY0lqlMIt1jh4B4HM8m/Nf5QQzNTIvAGO7wsKlqc=; b=QlA+mKLcZhaODAhzz8S78WQVv7ud3Ksx0fJeRAoHr31uPP1+6BwxMBgjaO6W+/NrTDqx7+ P0stpJJqXvIuhwHTgbmJFB2dDFT9509e8418kVaKsAa/rxhLwL65tuppghkJo2DOW4Q1WI 7FOZ6WGPZZNoXXdQf9+QFjE8L8xvEkmj3r4+0yuWwHpcwO+0KFFR8wE+OelhDzwopQKGN5 COPc9Ugx4pP6/yj5g1HX4DjT78IOFOAOedDN0ohJ+ie4C3799iO5wPMyiKIQSha8j20+qn 7OJbgaJwUmSkT1WYwfmOmPul/wqF4B06woa0NTwBqSFen0uiQQzgEDzkHk66Jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716235600; a=rsa-sha256; cv=none; b=R25lZq00G1ri3QB3x97BwAmh+/6Mqqjy5Jt/YPwgpC6nMSlb7BjU0yp2yIRfh3RjaK/771 0k3NhfTOpMXNwhcYIz0trsiuxkx2F5CvffhO3ouHia4mvCXEafBjiS6nqVf00QOzTmz8lX qPAVhEUONT3YGPYlV7OMSIdZKer6+BOG465gVtwLOPtAFybSBO/KoGh6722/XaBlXfsFve yXDwI9zOTWlP4ZJLOiFSfEDrZdVWzxKzg0SdTCXdT058KnIZ1LCXAXpMisfojJA/Gy3X4K 56nPTpoUXAgDr/bq9P3gwqZoz/uPQj+oTSW8OwuTGLRfkxPDbMCmSLEa5i2Vlg== 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=1716235600; 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=3knuY0lqlMIt1jh4B4HM8m/Nf5QQzNTIvAGO7wsKlqc=; b=cD+JwlQUGmKZoogeCvLEUTf26Bgi1A/LNSn4S+3QvDfXzTxoot+MSZaPCwAwhGrm8E6z9q sjIUbsg0tT6B9ow2AhPDISmATkRC4AyodiV2S1iFX3Vxkcny0SbHJLaFbCsxxyuLde4saN l+wbO0Io2aOxIj90JZhQqiTxH3H95XjDX88ujUUgkF3DYARgi9l3mUqkJ9DL7frLEKxb6C XHEQx9OIzlTTt+Zj3nHjIaRvE68oYPehKinqaynTeTFLj+mPE1ldEGLfCQnS286Gs0H2ZM 4fw4Zjn2UlvIG8k5FGoekV7eyA1zuthfEelmJPytLmYvX7vr79o2Clzzgem52g== 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 4VjpVm01gczrvN; Mon, 20 May 2024 20:06:40 +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 44KK6dNA007246; Mon, 20 May 2024 20:06:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44KK6d0b007243; Mon, 20 May 2024 20:06:39 GMT (envelope-from git) Date: Mon, 20 May 2024 20:06:39 GMT Message-Id: <202405202006.44KK6d0b007243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 4c2ea6e26d21 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4c2ea6e26d210d07d29c845addeb0c2a103f5904 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4c2ea6e26d210d07d29c845addeb0c2a103f5904 commit 4c2ea6e26d210d07d29c845addeb0c2a103f5904 Author: Matthew Grooms AuthorDate: 2024-05-03 14:41:05 +0000 Commit: Warner Losh CommitDate: 2024-05-20 19:23:40 +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) (cherry picked from commit 12117d0e9314d1706508386c1c49ace2de578b31) --- 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 ae691520e157..5b1cc7314984 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -4209,6 +4209,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); } @@ -4269,6 +4272,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); }