summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 1b77352..03e8d93 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -312,6 +312,9 @@ static int
sequential_heuristic(struct uio *uio, struct file *fp)
{
+ if (atomic_load_acq_int(&(fp->f_flag)) & FRDAHEAD)
+ return (fp->f_seqcount << IO_SEQSHIFT);
+
/*
* Offset 0 is handled specially. open() sets f_seqcount to 1 so
* that the first I/O is normally considered to be slightly
OpenPOWER on IntegriCloud