Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/ffs move the ffs_sync() after wapbl_log_position() c...



details:   https://anonhg.NetBSD.org/src/rev/badf61ae9df9
branches:  trunk
changeset: 352245:badf61ae9df9
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Mar 22 21:30:59 2017 +0000

description:
move the ffs_sync() after wapbl_log_position() call, since that can still
create delayed writes with MNT_ASYNC when log is created

diffstat:

 sys/ufs/ffs/ffs_wapbl.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (42 lines):

diff -r 8f816efc0a3a -r badf61ae9df9 sys/ufs/ffs/ffs_wapbl.c
--- a/sys/ufs/ffs/ffs_wapbl.c   Wed Mar 22 21:21:39 2017 +0000
+++ b/sys/ufs/ffs/ffs_wapbl.c   Wed Mar 22 21:30:59 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_wapbl.c,v 1.39 2017/03/16 22:09:19 jdolecek Exp $  */
+/*     $NetBSD: ffs_wapbl.c,v 1.40 2017/03/22 21:30:59 jdolecek Exp $  */
 
 /*-
  * Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.39 2017/03/16 22:09:19 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.40 2017/03/22 21:30:59 jdolecek Exp $");
 
 #define WAPBL_INTERNAL
 
@@ -338,6 +338,11 @@
                                return EINVAL;
                        }
 
+                       error = wapbl_log_position(mp, fs, devvp, &off,
+                           &count, &blksize, &extradata);
+                       if (error)
+                               return error;
+
                        /*
                         * Make sure we don't carry over any delayed write
                         * buffers when updating to log. Need to turn off
@@ -351,11 +356,6 @@
                                mp->mnt_flag |= saveflag;
                        }
 
-                       error = wapbl_log_position(mp, fs, devvp, &off,
-                           &count, &blksize, &extradata);
-                       if (error)
-                               return error;
-
                        error = wapbl_start(&mp->mnt_wapbl, mp, devvp, off,
                            count, blksize, mp->mnt_wapbl_replay,
                            ffs_wapbl_sync_metadata,



Home | Main Index | Thread Index | Old Index