diff options
-rw-r--r-- | sys/conf/files | 2 | ||||
-rw-r--r-- | sys/kern/vfs_bio.c | 8 | ||||
-rw-r--r-- | sys/modules/ufs/Makefile | 6 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_rawread.c | 10 |
4 files changed, 8 insertions, 18 deletions
diff --git a/sys/conf/files b/sys/conf/files index feb434c..08ce124 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3910,7 +3910,7 @@ ufs/ffs/ffs_subr.c optional ffs ufs/ffs/ffs_tables.c optional ffs ufs/ffs/ffs_vfsops.c optional ffs ufs/ffs/ffs_vnops.c optional ffs -ufs/ffs/ffs_rawread.c optional directio +ufs/ffs/ffs_rawread.c optional ffs directio ufs/ffs/ffs_suspend.c optional ffs ufs/ufs/ufs_acl.c optional ffs ufs/ufs/ufs_bmap.c optional ffs diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index d69bba9..3d19d74 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_extern.h> #include <vm/vm_map.h> #include "opt_compat.h" -#include "opt_directio.h" #include "opt_swap.h" static MALLOC_DEFINE(M_BIOBUF, "biobuf", "BIO buffer"); @@ -351,10 +350,6 @@ sysctl_bufspace(SYSCTL_HANDLER_ARGS) } #endif -#ifdef DIRECTIO -extern void ffs_rawread_setup(void); -#endif /* DIRECTIO */ - /* * bqlock: * @@ -739,9 +734,6 @@ kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est) if (nswbuf < NSWBUF_MIN) nswbuf = NSWBUF_MIN; #endif -#ifdef DIRECTIO - ffs_rawread_setup(); -#endif /* * Reserve space for the buffer cache buffers diff --git a/sys/modules/ufs/Makefile b/sys/modules/ufs/Makefile index 089c71d..5b90df7 100644 --- a/sys/modules/ufs/Makefile +++ b/sys/modules/ufs/Makefile @@ -6,9 +6,9 @@ KMOD= ufs SRCS= opt_ddb.h opt_directio.h opt_ffs.h opt_quota.h opt_suiddir.h opt_ufs.h \ vnode_if.h ufs_acl.c ufs_bmap.c ufs_dirhash.c ufs_extattr.c \ ufs_gjournal.c ufs_inode.c ufs_lookup.c ufs_quota.c ufs_vfsops.c \ - ufs_vnops.c ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_snapshot.c \ - ffs_softdep.c ffs_subr.c ffs_suspend.c ffs_tables.c ffs_vfsops.c \ - ffs_vnops.c + ufs_vnops.c ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_rawread.c \ + ffs_snapshot.c ffs_softdep.c ffs_subr.c ffs_suspend.c ffs_tables.c \ + ffs_vfsops.c ffs_vnops.c .if !defined(KERNBUILDDIR) CFLAGS+= -DSOFTUPDATES -DUFS_DIRHASH 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) |