summaryrefslogtreecommitdiff
path: root/sys/scsi/sdvar.h
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2011-07-11 06:26:10 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2011-07-11 06:26:10 +0000
commiteb66f3212310c11c093839a302e6aa659c2cbba8 (patch)
tree00f43cf9c99300c488b045fb50b7cfe265cb60bb /sys/scsi/sdvar.h
parent192a50c3d8eda14bf1d01029f66f66e9a1567b79 (diff)
ask the disk about unmap (read trim) parameters. check if we have the
required vpd pages, then read them for the values we want. we look for the max blocks per unmap, the max descriptors per unmap, and which scsi command to use for unmapping (unmap will be preferred). two fixes and ok matthew@
Diffstat (limited to 'sys/scsi/sdvar.h')
-rw-r--r--sys/scsi/sdvar.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/scsi/sdvar.h b/sys/scsi/sdvar.h
index 13b7c47ee3c..f723a7e9729 100644
--- a/sys/scsi/sdvar.h
+++ b/sys/scsi/sdvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdvar.h,v 1.37 2011/07/11 00:22:15 dlg Exp $ */
+/* $OpenBSD: sdvar.h,v 1.38 2011/07/11 06:26:09 dlg Exp $ */
/* $NetBSD: sdvar.h,v 1.7 1998/08/17 00:49:03 mycroft Exp $ */
/*-
@@ -66,6 +66,8 @@ struct sd_softc {
u_long sectors; /* number of sectors/track */
u_long secsize; /* number of bytes/sector */
daddr64_t disksize; /* total number sectors */
+ u_int32_t unmap_sectors; /* maximum sectors/unmap */
+ u_int32_t unmap_descs; /* maximum descriptors/unmap */
} params;
void *sc_sdhook; /* our shutdown hook */
struct timeout sc_timeout;