diff options
author | Matthew Dillon <dillon@FreeBSD.org> | 1999-09-20 23:27:58 +0000 |
---|---|---|
committer | Matthew Dillon <dillon@FreeBSD.org> | 1999-09-20 23:27:58 +0000 |
commit | 67ddfcaf69ec8773d5cf21c391988cf619366ab9 (patch) | |
tree | fb6b371033044aab7edd3d0d0fcc4dc7a484e7de /sys/gnu | |
parent | 8411bf657d4818368d4912df1bf950cb73981a3b (diff) | |
download | src-67ddfcaf69ec8773d5cf21c391988cf619366ab9.tar.gz src-67ddfcaf69ec8773d5cf21c391988cf619366ab9.zip |
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>
Notes
Notes:
svn path=/head/; revision=51486
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 abcdfe366e32..d49466d0fe68 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 abcdfe366e32..d49466d0fe68 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 |