aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/systm.h
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2012-02-21 01:05:12 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2012-02-21 01:05:12 +0000
commit526d0bd547574b185147f03c13e2db7abe566a08 (patch)
treed0d078391c4959fc08545db4ab619daadd9cf1d9 /sys/sys/systm.h
parent57a82ba4d95159d3623b0d401cfc3cc8f6357c28 (diff)
downloadsrc-526d0bd547574b185147f03c13e2db7abe566a08.tar.gz
src-526d0bd547574b185147f03c13e2db7abe566a08.zip
Fix found places where uio_resid is truncated to int.
Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from the usermode. Discussed with: bde, das (previous versions) MFC after: 1 month
Notes
Notes: svn path=/head/; revision=231949
Diffstat (limited to 'sys/sys/systm.h')
-rw-r--r--sys/sys/systm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 47b974a760fd..2773da80bd94 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -133,6 +133,9 @@ extern char **kenvp;
extern const void *zero_region; /* address space maps to a zeroed page */
+extern int iosize_max_clamp;
+#define IOSIZE_MAX (iosize_max_clamp ? INT_MAX : SSIZE_MAX)
+
/*
* General function declarations.
*/