Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs/union On forced unmount, do a few passes of non-f...
details: https://anonhg.NetBSD.org/src/rev/2adc2e83ec33
branches: trunk
changeset: 475092:2adc2e83ec33
user: sommerfeld <sommerfeld%NetBSD.org@localhost>
date: Sat Jul 31 23:56:15 1999 +0000
description:
On forced unmount, do a few passes of non-forced cleanups and then do
a single forced pass. Along for the ride with PR5146 fix.
diffstat:
sys/miscfs/union/union_vfsops.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (49 lines):
diff -r 9c1c8b746d6e -r 2adc2e83ec33 sys/miscfs/union/union_vfsops.c
--- a/sys/miscfs/union/union_vfsops.c Sat Jul 31 23:12:20 1999 +0000
+++ b/sys/miscfs/union/union_vfsops.c Sat Jul 31 23:56:15 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: union_vfsops.c,v 1.22 1999/05/02 00:18:31 thorpej Exp $ */
+/* $NetBSD: union_vfsops.c,v 1.23 1999/07/31 23:56:15 sommerfeld Exp $ */
/*
* Copyright (c) 1994 The Regents of the University of California.
@@ -294,15 +294,11 @@
struct vnode *um_rootvp;
int error;
int freeing;
- int flags = 0;
#ifdef UNION_DIAGNOSTIC
printf("union_unmount(mp = %p)\n", mp);
#endif
- if (mntflags & MNT_FORCE)
- flags |= FORCECLOSE;
-
if ((error = union_root(mp, &um_rootvp)) != 0)
return (error);
@@ -315,7 +311,7 @@
* (d) times, where (d) is the maximum tree depth
* in the filesystem.
*/
- for (freeing = 0; vflush(mp, um_rootvp, flags) != 0;) {
+ for (freeing = 0; vflush(mp, um_rootvp, 0) != 0;) {
struct vnode *vp;
int n;
@@ -333,6 +329,14 @@
freeing = n;
}
+ /*
+ * Ok, now that we've tried doing it gently, get out the hammer.
+ */
+
+ if (mntflags & MNT_FORCE)
+ vflush(mp, um_rootvp, FORCECLOSE);
+
+
/* At this point the root vnode should have a single reference */
if (um_rootvp->v_usecount > 1) {
vput(um_rootvp);
Home |
Main Index |
Thread Index |
Old Index