summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_export.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-09-17 06:10:27 +0000
committerdillon <dillon@FreeBSD.org>1999-09-17 06:10:27 +0000
commit2c39c80e008faac9624e07b55ab4dbb5caeeec09 (patch)
treed5fc5b7a259934fd6acd99e23c71a943d8e69834 /sys/kern/vfs_export.c
parent581716d4dfa79a615e2d311e2da0b1eca85bb5b6 (diff)
downloadFreeBSD-src-2c39c80e008faac9624e07b55ab4dbb5caeeec09.zip
FreeBSD-src-2c39c80e008faac9624e07b55ab4dbb5caeeec09.tar.gz
Add vfs.enable_userblk_io sysctl to control whether user reads and writes
to buffered block devices are allowed. The default is to be backwards compatible, i.e. reads and writes are allowed. The idea is for a larger crowd to start running with this disabled and see what problems, if any, crop up, and then to change the default to off and see if any problems crop up in the next 6 months prior to potentially removing support entirely. There are still a few people, Julian and myself included, who believe the buffered block device access from usermode to be useful. Remove use of vnode->v_lastr from buffered block device I/O in preparation for removal of vnode->v_lastr field, replacing it with the already existing seqcount metric to detect sequential operation. Reviewed by: Alan Cox <alc@cs.rice.edu>, David Greenman <dg@root.com>
Diffstat (limited to 'sys/kern/vfs_export.c')
-rw-r--r--sys/kern/vfs_export.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index b452cc1..757e4aa 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -113,6 +113,9 @@ SYSCTL_INT(_vfs, OID_AUTO, reassignbufsortbad, CTLFLAG_RW, &reassignbufsortbad,
static int reassignbufmethod = 1;
SYSCTL_INT(_vfs, OID_AUTO, reassignbufmethod, CTLFLAG_RW, &reassignbufmethod, 0, "");
+int enable_userblk_io = 1;
+SYSCTL_INT(_vfs, OID_AUTO, enable_userblk_io, CTLFLAG_RW, &enable_userblk_io, 0, "");
+
#ifdef ENABLE_VFS_IOOPT
int vfs_ioopt = 0;
SYSCTL_INT(_vfs, OID_AUTO, ioopt, CTLFLAG_RW, &vfs_ioopt, 0, "");
OpenPOWER on IntegriCloud