diff options
author | ambrisko <ambrisko@FreeBSD.org> | 2008-11-13 17:40:21 +0000 |
---|---|---|
committer | ambrisko <ambrisko@FreeBSD.org> | 2008-11-13 17:40:21 +0000 |
commit | 4ee5cbf821c9553c41dfee8833555d7d9515f2e6 (patch) | |
tree | e87c66fa1eaa1af6b42fc96896d96806498e02ba /sys | |
parent | 49e7633cf7e7fedd6c90ed91d279825c9aa94918 (diff) | |
download | FreeBSD-src-4ee5cbf821c9553c41dfee8833555d7d9515f2e6.zip FreeBSD-src-4ee5cbf821c9553c41dfee8833555d7d9515f2e6.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |