Re: git: 12117d0e9314 - main - da: Update trim stats for WRITE SAME and ATA TRIM
- In reply to: Ronald Klop : "Re: git: 12117d0e9314 - main - da: Update trim stats for WRITE SAME and ATA TRIM"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 03 May 2024 15:25:00 UTC
On Fri, May 3, 2024 at 9:21 AM Ronald Klop <ronald-lists@klop.ws> wrote: > Are you sure you used the right PR? > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277637 > "[NEW PORT] security/enc: Modern and friendly CLI alternative to GnuPG" > Doh! Should have used 277673. </doh!> Warner > > > Regards, > Ronald. > > > > *Van:* Warner Losh <imp@FreeBSD.org> > *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=12117d0e9314d1706508386c1c49ace2de578b31 > > commit 12117d0e9314d1706508386c1c49ace2de578b31 > Author: Matthew Grooms <mgrooms@shrew.net> > AuthorDate: 2024-05-03 14:41:05 +0000 > Commit: Warner Losh <imp@FreeBSD.org> > 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); > } > > > ------------------------------ > > > >