summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_disk.h
diff options
context:
space:
mode:
authorsmh <smh@FreeBSD.org>2013-04-26 16:22:54 +0000
committersmh <smh@FreeBSD.org>2013-04-26 16:22:54 +0000
commit04187593784330ee90171da3112f318e802f5341 (patch)
tree97998d55ef77c21ba6d178437ffc1aa53be9be90 /sys/geom/geom_disk.h
parent1ea74503ffd8a99053489e54715f57cb34bb9880 (diff)
downloadFreeBSD-src-04187593784330ee90171da3112f318e802f5341.zip
FreeBSD-src-04187593784330ee90171da3112f318e802f5341.tar.gz
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)
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 6d10a07..05c5de3 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];
OpenPOWER on IntegriCloud