summaryrefslogtreecommitdiff
path: root/sys/ufs/ffs/ffs_vnops.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2013-01-16 22:41:48 +0000
committerBob Beck <beck@cvs.openbsd.org>2013-01-16 22:41:48 +0000
commitb58d7c9b9df07228faec135a132e200c2b8d8987 (patch)
tree8006286cee780b07b59df6b6cc0613e778fe0b68 /sys/ufs/ffs/ffs_vnops.c
parent8d2ed94dc417e5d44fddbea075a342eb0adc81fa (diff)
re-backout the infamous softdep diff - originally committed to get around
the problem of the cleaner not being able to get softdep out of trouble due to the removal of a reserve back in vienna. Been run by me for a long time and beat up, along with a bunch of others. Hopefully this nasty piece of workaround can stay out for good now. ok guenther@
Diffstat (limited to 'sys/ufs/ffs/ffs_vnops.c')
-rw-r--r--sys/ufs/ffs/ffs_vnops.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index cf3bf2ad688..cf4ac62c3d6 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.69 2012/09/17 14:22:23 markus Exp $ */
+/* $OpenBSD: ffs_vnops.c,v 1.70 2013/01/16 22:41:47 beck Exp $ */
/* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */
/*
@@ -295,12 +295,10 @@ ffs_write(void *v)
struct inode *ip;
struct fs *fs;
struct buf *bp;
- struct proc *p;
daddr64_t lbn;
off_t osize;
int blkoffset, error, extended, flags, ioflag, resid, size, xfersize;
int overrun;
- extern int num_indirdep, max_indirdep;
extended = 0;
ioflag = ap->a_ioflag;
@@ -367,11 +365,7 @@ ffs_write(void *v)
if (uio->uio_offset + xfersize > DIP(ip, size)) {
DIP_ASSIGN(ip, size, uio->uio_offset + xfersize);
uvm_vnp_setsize(vp, DIP(ip, size));
- /* Are we extending into an indirect block? */
- if (bp->b_lblkno < NDADDR)
- extended = 1;
- else
- extended = 2;
+ extended = 1;
}
(void)uvm_vnp_uncache(vp);
@@ -415,21 +409,8 @@ ffs_write(void *v)
uio->uio_offset -= resid - uio->uio_resid;
uio->uio_resid = resid;
}
- } else if (resid > uio->uio_resid) {
- if (ioflag & IO_SYNC)
- error = UFS_UPDATE(ip, MNT_WAIT);
- if (DOINGSOFTDEP(vp) && num_indirdep > max_indirdep)
- if (extended > 1) {
- /*
- * If the number of pending indirect block
- * dependencies is sufficiently close to the
- * maximum number of simultaneously mappable
- * buffers force a sync on the vnode to prevent
- * buffer cache exhaustion.
- */
- p = uio->uio_procp;
- VOP_FSYNC(vp, NULL, MNT_WAIT, p);
- }
+ } else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) {
+ error = UFS_UPDATE(ip, MNT_WAIT);
}
/* correct the result for writes clamped by vn_fsizechk() */
uio->uio_resid += overrun;