Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Do the previous slightly different: any files on MN...



details:   https://anonhg.NetBSD.org/src/rev/94d9452689ac
branches:  trunk
changeset: 483676:94d9452689ac
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Wed Mar 15 16:28:45 2000 +0000

description:
Do the previous slightly different: any files on MNT_SOFTDEP filesystems do
not want all their metadata dependencies flushed from vinvalbuf() if
there are no dirty blocks.

diffstat:

 sys/kern/vfs_subr.c |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (32 lines):

diff -r 5d451aa2aeb8 -r 94d9452689ac sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c       Wed Mar 15 16:25:58 2000 +0000
+++ b/sys/kern/vfs_subr.c       Wed Mar 15 16:28:45 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_subr.c,v 1.119 2000/03/11 05:00:18 perseant Exp $  */
+/*     $NetBSD: vfs_subr.c,v 1.120 2000/03/15 16:28:45 fvdl Exp $      */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -614,12 +614,16 @@
                        tsleep((caddr_t)&vp->v_numoutput, PRIBIO + 1,
                            "vbwait", 0);
                }
-               splx(s);
-               if ((error = VOP_FSYNC(vp, cred, FSYNC_WAIT, p)) != 0)
-                       return (error);
-               s = splbio();
-               if (vp->v_numoutput > 0 || vp->v_dirtyblkhd.lh_first != NULL)
-                       panic("vinvalbuf: dirty bufs");
+               if (vp->v_dirtyblkhd.lh_first != NULL || vp->v_mount == NULL ||
+                   !(vp->v_mount->mnt_flag & MNT_SOFTDEP)) {
+                       splx(s);
+                       if ((error = VOP_FSYNC(vp, cred, FSYNC_WAIT, p)) != 0)
+                               return (error);
+                       s = splbio();
+                       if (vp->v_numoutput > 0 ||
+                           vp->v_dirtyblkhd.lh_first != NULL)
+                               panic("vinvalbuf: dirty bufs");
+               }
                splx(s);
        }
 



Home | Main Index | Thread Index | Old Index