diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2007-05-26 20:26:52 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2007-05-26 20:26:52 +0000 |
commit | 196f5066228d908cbac060396a1aba557efe1ef3 (patch) | |
tree | 5c48aa4f82af6d902afe35afb642c3d4225a1a07 /sys/ufs/ffs/ffs_vnops.c | |
parent | 6e18a0b85a66c596fb041fbf27229487f6661bbf (diff) |
Dynamic buffer cache. Initial diff from mickey@, okay art@ beck@ toby@
deraadt@ dlg@.
Diffstat (limited to 'sys/ufs/ffs/ffs_vnops.c')
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 7cb8ca1f6a7..1cf7a53c974 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_vnops.c,v 1.43 2007/04/13 17:09:22 thib Exp $ */ +/* $OpenBSD: ffs_vnops.c,v 1.44 2007/05/26 20:26:51 pedro Exp $ */ /* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */ /* @@ -214,7 +214,7 @@ ffs_read(void *v) break; lbn = lblkno(fs, uio->uio_offset); nextlbn = lbn + 1; - size = blksize(fs, ip, lbn); + size = fs->fs_bsize; /* WAS blksize(fs, ip, lbn); */ blkoffset = blkoff(fs, uio->uio_offset); xfersize = fs->fs_bsize - blkoffset; if (uio->uio_resid < xfersize) @@ -224,13 +224,8 @@ ffs_read(void *v) if (lblktosize(fs, nextlbn) >= DIP(ip, size)) error = bread(vp, lbn, size, NOCRED, &bp); - else if (doclusterread) - error = cluster_read(vp, &ip->i_ci, - DIP(ip, size), lbn, size, NOCRED, &bp); else if (lbn - 1 == ip->i_ci.ci_lastr) { - int nextsize = blksize(fs, ip, nextlbn); - error = breadn(vp, lbn, - size, &nextlbn, &nextsize, 1, NOCRED, &bp); + error = bread_cluster(vp, lbn, size, &bp); } else error = bread(vp, lbn, size, NOCRED, &bp); |