summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2002-12-28 20:28:10 +0000
committerdillon <dillon@FreeBSD.org>2002-12-28 20:28:10 +0000
commit4ecb4d83e44022a7cb2e3df7eb4430794d31afdd (patch)
tree095dcb0d1beff9fe8e8cfa8605299973e1abf296 /sys/kern/vfs_vnops.c
parentc538ab97f263bf99c70e52af35914192bce83ff2 (diff)
downloadFreeBSD-src-4ecb4d83e44022a7cb2e3df7eb4430794d31afdd.zip
FreeBSD-src-4ecb4d83e44022a7cb2e3df7eb4430794d31afdd.tar.gz
Abstract-out the constants for the sequential heuristic.
No operational changes. MFC after: 1 day
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 01afcd9..a801728 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -340,9 +340,9 @@ sequential_heuristic(struct uio *uio, struct file *fp)
* are.
*/
fp->f_seqcount += (uio->uio_resid + BKVASIZE - 1) / BKVASIZE;
- if (fp->f_seqcount >= 127)
- fp->f_seqcount = 127;
- return(fp->f_seqcount << 16);
+ if (fp->f_seqcount > IO_SEQMAX)
+ fp->f_seqcount = IO_SEQMAX;
+ return(fp->f_seqcount << IO_SEQSHIFT);
}
/*
OpenPOWER on IntegriCloud