aboutsummaryrefslogtreecommitdiff
path: root/sys/geom/geom_disk.h
diff options
context:
space:
mode:
authorSteven Hartland <smh@FreeBSD.org>2013-04-26 16:22:54 +0000
committerSteven Hartland <smh@FreeBSD.org>2013-04-26 16:22:54 +0000
commit9fe9ba5befe9077982dc5278f0703ffa5c246c8c (patch)
tree97998d55ef77c21ba6d178437ffc1aa53be9be90 /sys/geom/geom_disk.h
parentda98dc7f4397785a6f45828c04f3cb45b120b479 (diff)
downloadsrc-9fe9ba5befe9077982dc5278f0703ffa5c246c8c.tar.gz
src-9fe9ba5befe9077982dc5278f0703ffa5c246c8c.zip
Teach GEOM and CAM about the difference between the max "size" of r/w and delete
requests. sys/geom/geom_disk.h: - Added d_delmaxsize which represents the maximum size of individual device delete requests in bytes. This can be used by devices to inform geom of their size limitations regarding delete operations which are generally different from the read / write limits as data is not usually transferred from the host to physical device. sys/geom/geom_disk.c: - Use new d_delmaxsize to calculate the size of chunks passed through to the underlying strategy during deletes instead of using read / write optimised values. This defaults to d_maxsize if unset (0). - Moved d_maxsize default up so it can be used to default d_delmaxsize sys/cam/ata/ata_da.c: - Added d_delmaxsize calculations for TRIM and CFA sys/cam/scsi/scsi_da.c: - Added re-calculation of d_delmaxsize whenever delete_method is set. - Added kern.cam.da.X.delete_max sysctl which allows the max size for delete requests to be limited. This is useful in preventing timeouts on devices who's delete methods are slow. It should be noted that this limit is reset then the device delete method is changed and that it can only be lowered not increased from the device max. Reviewed by: mav Approved by: pjd (mentor)
Notes
Notes: svn path=/head/; revision=249940
Diffstat (limited to 'sys/geom/geom_disk.h')
-rw-r--r--sys/geom/geom_disk.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/geom/geom_disk.h b/sys/geom/geom_disk.h
index 6d10a075885f..05c5de3dad69 100644
--- a/sys/geom/geom_disk.h
+++ b/sys/geom/geom_disk.h
@@ -88,6 +88,7 @@ struct disk {
u_int d_fwsectors;
u_int d_fwheads;
u_int d_maxsize;
+ off_t d_delmaxsize;
u_int d_stripeoffset;
u_int d_stripesize;
char d_ident[DISK_IDENT_SIZE];