diff options
author | dillon <dillon@FreeBSD.org> | 1999-09-20 23:27:58 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-09-20 23:27:58 +0000 |
commit | 3bddba795147da5c018578644f1757f6e636baf5 (patch) | |
tree | db5c683fc7317e476f83f4d362edb5db22f5cbe4 /sys/gnu | |
parent | 163338fbe7a66e7733f929fb8a033966c8e69b0d (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/gnu/ext2fs/ext2_readwrite.c | 5 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_readwrite.c | 5 |
2 files changed, 6 insertions, 4 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 diff --git a/sys/gnu/fs/ext2fs/ext2_readwrite.c b/sys/gnu/fs/ext2fs/ext2_readwrite.c index abcdfe3..d49466d 100644 --- a/sys/gnu/fs/ext2fs/ext2_readwrite.c +++ b/sys/gnu/fs/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 |