svn commit: r361865 - head/sys/cam/nvme
Warner Losh
imp at FreeBSD.org
Sat Jun 6 06:20:05 UTC 2020
Author: imp
Date: Sat Jun 6 06:20:04 2020
New Revision: 361865
URL: https://svnweb.freebsd.org/changeset/base/361865
Log:
Ensure that we send at least LBA range per TRIM.
Modified:
head/sys/cam/nvme/nvme_da.c
Modified: head/sys/cam/nvme/nvme_da.c
==============================================================================
--- head/sys/cam/nvme/nvme_da.c Sat Jun 6 06:17:51 2020 (r361864)
+++ head/sys/cam/nvme/nvme_da.c Sat Jun 6 06:20:04 2020 (r361865)
@@ -1082,6 +1082,7 @@ ndastart(struct cam_periph *periph, union ccb *start_c
TAILQ_INIT(&trim->bps);
bp1 = bp;
ents = min(nitems(trim->dsm), nda_max_trim_entries);
+ ents = max(ents, 1);
dsm_range = trim->dsm;
dsm_end = dsm_range + ents;
do {
More information about the svn-src-head
mailing list