summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>2006-05-03 00:10:29 +0000
committertegge <tegge@FreeBSD.org>2006-05-03 00:10:29 +0000
commite2c33fcc897dcf0c3c6d88080a723627e4ba4860 (patch)
tree88b4cb1dc9ffb2e2723d19299ee1b744a16e1b60 /sys/ufs
parent5174ba191d8706ea1654c6b774876294e5c1ea72 (diff)
downloadFreeBSD-src-e2c33fcc897dcf0c3c6d88080a723627e4ba4860.zip
FreeBSD-src-e2c33fcc897dcf0c3c6d88080a723627e4ba4860.tar.gz
Temporarily undo clusters contribution to global runningbufspace while
handling copy on write for the buffers taking part in the cluster.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 8d943e7..e3eda44 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1781,6 +1781,7 @@ ffs_geom_strategy(struct bufobj *bo, struct buf *bp)
if ((vp->v_vflag & VV_COPYONWRITE) &&
vp->v_rdev->si_snapdata != NULL) {
if ((bp->b_flags & B_CLUSTER) != 0) {
+ runningbufwakeup(bp);
TAILQ_FOREACH(tbp, &bp->b_cluster.cluster_head,
b_cluster.cluster_entry) {
error = ffs_copyonwrite(vp, tbp);
@@ -1792,6 +1793,9 @@ ffs_geom_strategy(struct bufobj *bo, struct buf *bp)
return;
}
}
+ bp->b_runningbufspace = bp->b_bufsize;
+ atomic_add_int(&runningbufspace,
+ bp->b_runningbufspace);
} else {
error = ffs_copyonwrite(vp, bp);
if (error != 0 && error != EOPNOTSUPP) {
OpenPOWER on IntegriCloud