From 4ee5cbf821c9553c41dfee8833555d7d9515f2e6 Mon Sep 17 00:00:00 2001 From: ambrisko Date: Thu, 13 Nov 2008 17:40:21 +0000 Subject: For now on every 10 cyclinder groups flush the buffer cache to free up space. If the buffer cache fills up then the disk systems can grind to a halt. Better tuning can be figured out later. Tested by: Tim, others and work Reviewed by: Kostik Belousov PR: 128832 --- sys/ufs/ffs/ffs_snapshot.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/ufs/ffs') diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index bb39bd6..dff56ed 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -351,6 +351,8 @@ restart: if (error) goto out; bawrite(nbp); + if (cg % 10 == 0) + ffs_syncvnode(vp, MNT_WAIT); } /* * Copy all the cylinder group maps. Although the @@ -372,6 +374,8 @@ restart: goto out; error = cgaccount(cg, vp, nbp, 1); bawrite(nbp); + if (cg % 10 == 0) + ffs_syncvnode(vp, MNT_WAIT); if (error) goto out; } -- cgit v1.1