From 24528b3490e1cb55bfdb83a7940f7d8e4a067716 Mon Sep 17 00:00:00 2001 From: tegge Date: Sat, 13 May 2006 23:58:41 +0000 Subject: [PATCH] MFC: Temporarily undo clusters contribution to global runningbufspace while handling copy on write for the buffers taking part in the cluster. --- sys/ufs/ffs/ffs_vfsops.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 3d9f9cfe205b..2be2fdc06d80 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1728,6 +1728,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); @@ -1739,6 +1740,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) {