Current-Users archive

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

don't use wapbl (-o log) on / (/dev)



hi

don't use wapbl (-o log) on / (/dev) because it leads silent data
corruption on (at least) msdosfs. it was introduced in

  
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/ufs/ffs/ffs_vnops.c.diff?r1=1.105&r2=1.106
  
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/ufs/ffs/ffs_vnops.c.diff?r1=1.104.4.1&r2=1.104.4.2

system hang on mount/umount is also reported in japanese mailing list.
I'm not sure it affects (or not) on another file system.

attached patch fixes this problem. but I have no time to test kern/40246.

--
FUKAUMI Naoki
Index: ffs_vnops.c
===================================================================
RCS file: /home/fun/cvsroot/NetBSD/src/sys/ufs/ffs/ffs_vnops.c,v
retrieving revision 1.104.4.5
diff -u -p -r1.104.4.5 ffs_vnops.c
--- ffs_vnops.c 2 Feb 2009 21:17:08 -0000       1.104.4.5
+++ ffs_vnops.c 15 Feb 2009 15:13:54 -0000
@@ -295,6 +295,9 @@ ffs_fsync(void *v)
        if ((ap->a_offlo == 0 && ap->a_offhi == 0) || DOINGSOFTDEP(vp) ||
            (vp->v_type != VREG)) {
                int flags = ap->a_flags;
+
+               if (vp->v_type == VBLK && vp->v_specmountpoint != NULL)
+                       flags |= FSYNC_VFS;
                error = ffs_full_fsync(vp, flags);
                goto out;
        }


Home | Main Index | Thread Index | Old Index