diff options
author | kib <kib@FreeBSD.org> | 2014-06-15 05:15:38 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-06-15 05:15:38 +0000 |
commit | 249e790152e39fa6d08cfe0eaacd610b1871b25c (patch) | |
tree | 81c93a5f6b8d94dadfbf0f186bf95f496148cc2d /sys/ufs | |
parent | f631a2c600c2f4b30209d641868ec9ec55f3d3b3 (diff) | |
download | FreeBSD-src-249e790152e39fa6d08cfe0eaacd610b1871b25c.zip FreeBSD-src-249e790152e39fa6d08cfe0eaacd610b1871b25c.tar.gz |
MFC r267226:
Initialize the pbuf counter for directio using SYSINIT.
Mark ffs_rawread.c as requiring both ffs and directio options to be
compiled into the kernel. Add ffs_rawread.c to the list of ufs.ko
module' sources.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_rawread.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c index 1c8aaec..aaa052e 100644 --- a/sys/ufs/ffs/ffs_rawread.c +++ b/sys/ufs/ffs/ffs_rawread.c @@ -71,8 +71,6 @@ static int ffs_rawread_sync(struct vnode *vp); int ffs_rawread(struct vnode *vp, struct uio *uio, int *workdone); -void ffs_rawread_setup(void); - SYSCTL_DECL(_vfs_ffs); static int ffsrawbufcnt = 4; @@ -87,13 +85,13 @@ static int rawreadahead = 1; SYSCTL_INT(_vfs_ffs, OID_AUTO, rawreadahead, CTLFLAG_RW, &rawreadahead, 0, "Flag to enable readahead for long raw reads"); - -void -ffs_rawread_setup(void) +static void +ffs_rawread_setup(void *arg __unused) { + ffsrawbufcnt = (nswbuf > 100 ) ? (nswbuf - (nswbuf >> 4)) : nswbuf - 8; } - +SYSINIT(ffs_raw, SI_SUB_VM_CONF, SI_ORDER_ANY, ffs_rawread_setup, NULL); static int ffs_rawread_sync(struct vnode *vp) |