summaryrefslogtreecommitdiffstats
path: root/sys/gnu/ext2fs
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-09-20 23:27:58 +0000
committerdillon <dillon@FreeBSD.org>1999-09-20 23:27:58 +0000
commit3bddba795147da5c018578644f1757f6e636baf5 (patch)
treedb5c683fc7317e476f83f4d362edb5db22f5cbe4 /sys/gnu/ext2fs
parent163338fbe7a66e7733f929fb8a033966c8e69b0d (diff)
downloadFreeBSD-src-3bddba795147da5c018578644f1757f6e636baf5.zip
FreeBSD-src-3bddba795147da5c018578644f1757f6e636baf5.tar.gz
More removals of vnode->v_lastr, replaced by preexisting seqcount
heuristic to detect sequential operation. VM-related forced clustering code removed from ufs in preparation for a commit to vm/vm_fault.c that does it more generally. Reviewed by: David Greenman <dg@root.com>, Alan Cox <alc@cs.rice.edu>
Diffstat (limited to 'sys/gnu/ext2fs')
-rw-r--r--sys/gnu/ext2fs/ext2_readwrite.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/gnu/ext2fs/ext2_readwrite.c b/sys/gnu/ext2fs/ext2_readwrite.c
index abcdfe3..d49466d 100644
--- a/sys/gnu/ext2fs/ext2_readwrite.c
+++ b/sys/gnu/ext2fs/ext2_readwrite.c
@@ -37,6 +37,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_readwrite.c 8.7 (Berkeley) 1/21/94
+ * $FreeBSD$
*/
#define BLKSIZE(a, b, c) blksize(a, b, c)
@@ -69,6 +70,7 @@ READ(ap)
off_t bytesinfile;
long size, xfersize, blkoffset;
int error, orig_resid;
+ int seqcount = ap->a_ioflag >> 16;
u_short mode;
vp = ap->a_vp;
@@ -113,7 +115,7 @@ READ(ap)
error = cluster_read(vp,
ip->i_size, lbn, size, NOCRED,
uio->uio_resid, (ap->a_ioflag >> 16), &bp);
- else if (lbn - 1 == vp->v_lastr) {
+ else if (seqcount > 1) {
int nextsize = BLKSIZE(fs, ip, nextlbn);
error = breadn(vp, lbn,
size, &nextlbn, &nextsize, 1, NOCRED, &bp);
@@ -124,7 +126,6 @@ READ(ap)
bp = NULL;
break;
}
- vp->v_lastr = lbn;
/*
* We should only get non-zero b_resid when an I/O error
OpenPOWER on IntegriCloud