summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2004-02-11 15:27:26 +0000
committerbde <bde@FreeBSD.org>2004-02-11 15:27:26 +0000
commit7e5e459beb0fa7f41d97455bdc57e0d4a80f12b6 (patch)
tree0352d38240edd04d673c1ea3e76c98e20930b1e5 /sys/ufs
parent65e2a4b5fb3b06b5ce253f7412fece02e2cc37c7 (diff)
downloadFreeBSD-src-7e5e459beb0fa7f41d97455bdc57e0d4a80f12b6.zip
FreeBSD-src-7e5e459beb0fa7f41d97455bdc57e0d4a80f12b6.tar.gz
Removed more vestiges of vfs_ioopt:
- rev.1.42 of ffs_readwrite.c added a special case in ffs_read() for reads that are initially at EOF, and rev.1.62 of ufs_readwrite.c fixed timestamp bugs in it. Removal of most of vfs_ioopt made it just and optimization, and removal of the vm object reference calls made it less than an optimization. It was cloned in rev.1.94 of ufs_readwrite.c as part of cloning ffs_extwrite() although it was always less than an optimization in ffs_extwrite(). - some comments, compound statements and vertical whitespace were vestiges of dead code.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_vnops.c42
1 files changed, 4 insertions, 38 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 7abceaf..d86e10c 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -395,22 +395,9 @@ ffs_read(ap)
uio->uio_offset >= fs->fs_maxfilesize)
return (EOVERFLOW);
- bytesinfile = ip->i_size - uio->uio_offset;
- if (bytesinfile <= 0) {
- if ((vp->v_mount->mnt_flag & MNT_NOATIME) == 0)
- ip->i_flag |= IN_ACCESS;
- return (0);
- }
-
-
- /*
- * Ok so we couldn't do it all in one vm trick...
- * so cycle around trying smaller bites..
- */
for (error = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) {
if ((bytesinfile = ip->i_size - uio->uio_offset) <= 0)
break;
-
lbn = lblkno(fs, uio->uio_offset);
nextlbn = lbn + 1;
@@ -504,15 +491,8 @@ ffs_read(ap)
xfersize = size;
}
- {
- /*
- * otherwise use the general form
- */
- error =
- uiomove((char *)bp->b_data + blkoffset,
- (int)xfersize, uio);
- }
-
+ error = uiomove((char *)bp->b_data + blkoffset,
+ (int)xfersize, uio);
if (error)
break;
@@ -597,7 +577,6 @@ ffs_write(ap)
seqcount = ap->a_ioflag >> IO_SEQSHIFT;
ip = VTOI(vp);
-
#ifdef DIAGNOSTIC
if (uio->uio_rw != UIO_WRITE)
panic("ffs_write: mode");
@@ -607,9 +586,8 @@ ffs_write(ap)
case VREG:
if (ioflag & IO_APPEND)
uio->uio_offset = ip->i_size;
- if ((ip->i_flags & APPEND) && uio->uio_offset != ip->i_size) {
+ if ((ip->i_flags & APPEND) && uio->uio_offset != ip->i_size)
return (EPERM);
- }
/* FALLTHROUGH */
case VLNK:
break;
@@ -626,9 +604,8 @@ ffs_write(ap)
KASSERT(uio->uio_resid >= 0, ("ffs_write: uio->uio_resid < 0"));
KASSERT(uio->uio_offset >= 0, ("ffs_write: uio->uio_offset < 0"));
fs = ip->i_fs;
- if ((uoff_t)uio->uio_offset + uio->uio_resid > fs->fs_maxfilesize) {
+ if ((uoff_t)uio->uio_offset + uio->uio_resid > fs->fs_maxfilesize)
return (EFBIG);
- }
/*
* Maybe this should be above the vnode op call, but so long as
* file servers have no limits, I don't think it matters.
@@ -660,7 +637,6 @@ ffs_write(ap)
xfersize = fs->fs_bsize - blkoffset;
if (uio->uio_resid < xfersize)
xfersize = uio->uio_resid;
-
if (uio->uio_offset + xfersize > ip->i_size)
vnode_pager_setsize(vp, uio->uio_offset + xfersize);
@@ -760,8 +736,6 @@ ffs_write(ap)
}
} else if (resid > uio->uio_resid && (ioflag & IO_SYNC))
error = UFS_UPDATE(vp, 1);
-
-
return (error);
}
@@ -948,17 +922,9 @@ ffs_extread(struct vnode *vp, struct uio *uio, int ioflag)
return (0);
KASSERT(uio->uio_offset >= 0, ("ffs_extread: uio->uio_offset < 0"));
- bytesinfile = dp->di_extsize - uio->uio_offset;
- if (bytesinfile <= 0) {
- if ((vp->v_mount->mnt_flag & MNT_NOATIME) == 0)
- ip->i_flag |= IN_ACCESS;
- return (0);
- }
-
for (error = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) {
if ((bytesinfile = dp->di_extsize - uio->uio_offset) <= 0)
break;
-
lbn = lblkno(fs, uio->uio_offset);
nextlbn = lbn + 1;
OpenPOWER on IntegriCloud