Sat Jan 3 03:31:23 2009 UTC ()
remove extra semicolons.


(yamt)
diff -r1.8 -r1.9 src/sys/kern/kern_cctr.c
diff -r1.20 -r1.21 src/sys/kern/kern_drvctl.c
diff -r1.363 -r1.364 src/sys/kern/vfs_subr.c
diff -r1.16 -r1.17 src/sys/kern/vfs_wapbl.c

cvs diff -r1.8 -r1.9 src/sys/kern/kern_cctr.c (expand / switch to unified diff)

--- src/sys/kern/kern_cctr.c 2008/05/19 17:06:02 1.8
+++ src/sys/kern/kern_cctr.c 2009/01/03 03:31:23 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: kern_cctr.c,v 1.8 2008/05/19 17:06:02 ad Exp $ */ 1/* $NetBSD: kern_cctr.c,v 1.9 2009/01/03 03:31:23 yamt Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2006, 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 2006, 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * re-implementation of TSC for MP systems merging cc_microtime and 7 * re-implementation of TSC for MP systems merging cc_microtime and
8 * TSC for timecounters by Frank Kardel 8 * TSC for timecounters by Frank Kardel
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -65,27 +65,27 @@ @@ -65,27 +65,27 @@
65 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 65 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
66 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 66 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
67 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 67 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
68 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 68 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
69 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 69 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
70 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 70 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
71 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 71 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
72 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 72 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
73 * SUCH DAMAGE. 73 * SUCH DAMAGE.
74 */ 74 */
75 75
76#include <sys/cdefs.h> 76#include <sys/cdefs.h>
77/* __FBSDID("$FreeBSD: src/sys/i386/i386/tsc.c,v 1.204 2003/10/21 18:28:34 silby Exp $"); */ 77/* __FBSDID("$FreeBSD: src/sys/i386/i386/tsc.c,v 1.204 2003/10/21 18:28:34 silby Exp $"); */
78__KERNEL_RCSID(0, "$NetBSD: kern_cctr.c,v 1.8 2008/05/19 17:06:02 ad Exp $"); 78__KERNEL_RCSID(0, "$NetBSD: kern_cctr.c,v 1.9 2009/01/03 03:31:23 yamt Exp $");
79 79
80#include <sys/param.h> 80#include <sys/param.h>
81#include <sys/systm.h> 81#include <sys/systm.h>
82#include <sys/sysctl.h> 82#include <sys/sysctl.h>
83#include <sys/time.h> 83#include <sys/time.h>
84#include <sys/timetc.h> 84#include <sys/timetc.h>
85#include <sys/kernel.h> 85#include <sys/kernel.h>
86#include <sys/power.h> 86#include <sys/power.h>
87#include <sys/cpu.h> 87#include <sys/cpu.h>
88#include <machine/cpu_counter.h> 88#include <machine/cpu_counter.h>
89 89
90/* XXX make cc_timecounter.tc_frequency settable by sysctl() */ 90/* XXX make cc_timecounter.tc_frequency settable by sysctl() */
91 91
@@ -251,27 +251,27 @@ cc_calibrate_cpu(struct cpu_info *ci) @@ -251,27 +251,27 @@ cc_calibrate_cpu(struct cpu_info *ci)
251 ci->ci_cc.cc_gen = 0; 251 ci->ci_cc.cc_gen = 0;
252 252
253 denom = ci->ci_cc.cc_cc; 253 denom = ci->ci_cc.cc_cc;
254 ci->ci_cc.cc_cc = cpu_counter32(); 254 ci->ci_cc.cc_cc = cpu_counter32();
255 255
256 if (ci->ci_cc.cc_denom == 0) { 256 if (ci->ci_cc.cc_denom == 0) {
257 /* 257 /*
258 * This is our first time here on this CPU. Just 258 * This is our first time here on this CPU. Just
259 * start with reasonable initial values. 259 * start with reasonable initial values.
260 */ 260 */
261 ci->ci_cc.cc_val = val; 261 ci->ci_cc.cc_val = val;
262 ci->ci_cc.cc_denom = cpu_frequency(ci); 262 ci->ci_cc.cc_denom = cpu_frequency(ci);
263 if (ci->ci_cc.cc_denom == 0) 263 if (ci->ci_cc.cc_denom == 0)
264 ci->ci_cc.cc_denom = cc_timecounter.tc_frequency;; 264 ci->ci_cc.cc_denom = cc_timecounter.tc_frequency;
265 ci->ci_cc.cc_delta = ci->ci_cc.cc_denom; 265 ci->ci_cc.cc_delta = ci->ci_cc.cc_denom;
266 ci->ci_cc.cc_gen = gen; 266 ci->ci_cc.cc_gen = gen;
267 splx(s); 267 splx(s);
268 return; 268 return;
269 } 269 }
270 270
271#ifdef TIMECOUNTER_DEBUG 271#ifdef TIMECOUNTER_DEBUG
272 old_factor = (ci->ci_cc.cc_delta * 1000 ) / ci->ci_cc.cc_denom; 272 old_factor = (ci->ci_cc.cc_delta * 1000 ) / ci->ci_cc.cc_denom;
273#endif 273#endif
274 274
275 /* local ticks per period */ 275 /* local ticks per period */
276 denom = ci->ci_cc.cc_cc - denom; 276 denom = ci->ci_cc.cc_cc - denom;
277 if (denom < 0) 277 if (denom < 0)

cvs diff -r1.20 -r1.21 src/sys/kern/kern_drvctl.c (expand / switch to unified diff)

--- src/sys/kern/kern_drvctl.c 2008/11/23 23:59:41 1.20
+++ src/sys/kern/kern_drvctl.c 2009/01/03 03:31:23 1.21
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: kern_drvctl.c,v 1.20 2008/11/23 23:59:41 jmcneill Exp $ */ 1/* $NetBSD: kern_drvctl.c,v 1.21 2009/01/03 03:31:23 yamt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004 4 * Copyright (c) 2004
5 * Matthias Drochner. All rights reserved. 5 * Matthias Drochner. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions, and the following disclaimer. 11 * notice, this list of conditions, and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -17,27 +17,27 @@ @@ -17,27 +17,27 @@
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE. 26 * SUCH DAMAGE.
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30__KERNEL_RCSID(0, "$NetBSD: kern_drvctl.c,v 1.20 2008/11/23 23:59:41 jmcneill Exp $"); 30__KERNEL_RCSID(0, "$NetBSD: kern_drvctl.c,v 1.21 2009/01/03 03:31:23 yamt Exp $");
31 31
32#include <sys/param.h> 32#include <sys/param.h>
33#include <sys/systm.h> 33#include <sys/systm.h>
34#include <sys/kernel.h> 34#include <sys/kernel.h>
35#include <sys/conf.h> 35#include <sys/conf.h>
36#include <sys/device.h> 36#include <sys/device.h>
37#include <sys/event.h> 37#include <sys/event.h>
38#include <sys/malloc.h> 38#include <sys/malloc.h>
39#include <sys/kmem.h> 39#include <sys/kmem.h>
40#include <sys/ioctl.h> 40#include <sys/ioctl.h>
41#include <sys/fcntl.h> 41#include <sys/fcntl.h>
42#include <sys/file.h> 42#include <sys/file.h>
43#include <sys/filedesc.h> 43#include <sys/filedesc.h>
@@ -96,27 +96,27 @@ static int drvctl_getevent(struct lwp *, @@ -96,27 +96,27 @@ static int drvctl_getevent(struct lwp *,
96 96
97void 97void
98drvctl_init(void) 98drvctl_init(void)
99{ 99{
100 TAILQ_INIT(&drvctl_eventq); 100 TAILQ_INIT(&drvctl_eventq);
101 mutex_init(&drvctl_lock, MUTEX_DEFAULT, IPL_NONE); 101 mutex_init(&drvctl_lock, MUTEX_DEFAULT, IPL_NONE);
102 cv_init(&drvctl_cond, "devmon"); 102 cv_init(&drvctl_cond, "devmon");
103 selinit(&drvctl_rdsel); 103 selinit(&drvctl_rdsel);
104} 104}
105 105
106void 106void
107devmon_insert(const char *event, prop_dictionary_t ev) 107devmon_insert(const char *event, prop_dictionary_t ev)
108{ 108{
109 struct drvctl_event *dce, *odce;; 109 struct drvctl_event *dce, *odce;
110 110
111 mutex_enter(&drvctl_lock); 111 mutex_enter(&drvctl_lock);
112 112
113 if (drvctl_nopen == 0) { 113 if (drvctl_nopen == 0) {
114 mutex_exit(&drvctl_lock); 114 mutex_exit(&drvctl_lock);
115 return; 115 return;
116 } 116 }
117 117
118 /* Fill in mandatory member */ 118 /* Fill in mandatory member */
119 if (!prop_dictionary_set_cstring_nocopy(ev, "event", event)) { 119 if (!prop_dictionary_set_cstring_nocopy(ev, "event", event)) {
120 prop_object_release(ev); 120 prop_object_release(ev);
121 mutex_exit(&drvctl_lock); 121 mutex_exit(&drvctl_lock);
122 return; 122 return;

cvs diff -r1.363 -r1.364 src/sys/kern/vfs_subr.c (expand / switch to unified diff)

--- src/sys/kern/vfs_subr.c 2008/12/29 17:41:18 1.363
+++ src/sys/kern/vfs_subr.c 2009/01/03 03:31:23 1.364
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: vfs_subr.c,v 1.363 2008/12/29 17:41:18 pooka Exp $ */ 1/* $NetBSD: vfs_subr.c,v 1.364 2009/01/03 03:31:23 yamt Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 * NASA Ames Research Center, by Charles M. Hannum, and by Andrew Doran. 9 * NASA Ames Research Center, by Charles M. Hannum, and by Andrew Doran.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -71,27 +71,27 @@ @@ -71,27 +71,27 @@
71 * 71 *
72 * At nearly all points it is known that v_usecount could be zero, the 72 * At nearly all points it is known that v_usecount could be zero, the
73 * vnode interlock will be held. 73 * vnode interlock will be held.
74 * 74 *
75 * To change v_usecount away from zero, the interlock must be held. To 75 * To change v_usecount away from zero, the interlock must be held. To
76 * change from a non-zero value to zero, again the interlock must be 76 * change from a non-zero value to zero, again the interlock must be
77 * held. 77 * held.
78 * 78 *
79 * Changing the usecount from a non-zero value to a non-zero value can 79 * Changing the usecount from a non-zero value to a non-zero value can
80 * safely be done using atomic operations, without the interlock held. 80 * safely be done using atomic operations, without the interlock held.
81 */ 81 */
82 82
83#include <sys/cdefs.h> 83#include <sys/cdefs.h>
84__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.363 2008/12/29 17:41:18 pooka Exp $"); 84__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.364 2009/01/03 03:31:23 yamt Exp $");
85 85
86#include "opt_ddb.h" 86#include "opt_ddb.h"
87#include "opt_compat_netbsd.h" 87#include "opt_compat_netbsd.h"
88#include "opt_compat_43.h" 88#include "opt_compat_43.h"
89 89
90#include <sys/param.h> 90#include <sys/param.h>
91#include <sys/systm.h> 91#include <sys/systm.h>
92#include <sys/conf.h> 92#include <sys/conf.h>
93#include <sys/proc.h> 93#include <sys/proc.h>
94#include <sys/kernel.h> 94#include <sys/kernel.h>
95#include <sys/mount.h> 95#include <sys/mount.h>
96#include <sys/fcntl.h> 96#include <sys/fcntl.h>
97#include <sys/vnode.h> 97#include <sys/vnode.h>
@@ -168,27 +168,27 @@ MALLOC_DEFINE(M_VNODE, "vnodes", "Dynami @@ -168,27 +168,27 @@ MALLOC_DEFINE(M_VNODE, "vnodes", "Dynami
168/* 168/*
169 * These define the root filesystem and device. 169 * These define the root filesystem and device.
170 */ 170 */
171struct vnode *rootvnode; 171struct vnode *rootvnode;
172struct device *root_device; /* root device */ 172struct device *root_device; /* root device */
173 173
174/* 174/*
175 * Local declarations. 175 * Local declarations.
176 */ 176 */
177 177
178static void vrele_thread(void *); 178static void vrele_thread(void *);
179static void insmntque(vnode_t *, struct mount *); 179static void insmntque(vnode_t *, struct mount *);
180static int getdevvp(dev_t, vnode_t **, enum vtype); 180static int getdevvp(dev_t, vnode_t **, enum vtype);
181static vnode_t *getcleanvnode(void);; 181static vnode_t *getcleanvnode(void);
182void vpanic(vnode_t *, const char *); 182void vpanic(vnode_t *, const char *);
183 183
184#ifdef DEBUG  184#ifdef DEBUG
185void printlockedvnodes(void); 185void printlockedvnodes(void);
186#endif 186#endif
187 187
188#ifdef DIAGNOSTIC 188#ifdef DIAGNOSTIC
189void 189void
190vpanic(vnode_t *vp, const char *msg) 190vpanic(vnode_t *vp, const char *msg)
191{ 191{
192 192
193 vprint(NULL, vp); 193 vprint(NULL, vp);
194 panic("%s\n", msg); 194 panic("%s\n", msg);

cvs diff -r1.16 -r1.17 src/sys/kern/vfs_wapbl.c (expand / switch to unified diff)

--- src/sys/kern/vfs_wapbl.c 2008/11/24 16:05:21 1.16
+++ src/sys/kern/vfs_wapbl.c 2009/01/03 03:31:23 1.17
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: vfs_wapbl.c,v 1.16 2008/11/24 16:05:21 joerg Exp $ */ 1/* $NetBSD: vfs_wapbl.c,v 1.17 2009/01/03 03:31:23 yamt Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2003,2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 2003,2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Wasabi Systems, Inc. 8 * by Wasabi Systems, Inc.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -26,27 +26,27 @@ @@ -26,27 +26,27 @@
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * This implements file system independent write ahead filesystem logging. 33 * This implements file system independent write ahead filesystem logging.
34 */ 34 */
35 35
36#define WAPBL_INTERNAL 36#define WAPBL_INTERNAL
37 37
38#include <sys/cdefs.h> 38#include <sys/cdefs.h>
39__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.16 2008/11/24 16:05:21 joerg Exp $"); 39__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.17 2009/01/03 03:31:23 yamt Exp $");
40 40
41#include <sys/param.h> 41#include <sys/param.h>
42 42
43#ifdef _KERNEL 43#ifdef _KERNEL
44#include <sys/param.h> 44#include <sys/param.h>
45#include <sys/namei.h> 45#include <sys/namei.h>
46#include <sys/proc.h> 46#include <sys/proc.h>
47#include <sys/uio.h> 47#include <sys/uio.h>
48#include <sys/vnode.h> 48#include <sys/vnode.h>
49#include <sys/file.h> 49#include <sys/file.h>
50#include <sys/malloc.h> 50#include <sys/malloc.h>
51#include <sys/resourcevar.h> 51#include <sys/resourcevar.h>
52#include <sys/conf.h> 52#include <sys/conf.h>
@@ -1868,27 +1868,27 @@ wapbl_write_commit(struct wapbl *wl, off @@ -1868,27 +1868,27 @@ wapbl_write_commit(struct wapbl *wl, off
1868 /* XXX Calc checksum here, instead we do this for now */ 1868 /* XXX Calc checksum here, instead we do this for now */
1869 error = VOP_IOCTL(wl->wl_devvp, DIOCCACHESYNC, &force, FWRITE, FSCRED); 1869 error = VOP_IOCTL(wl->wl_devvp, DIOCCACHESYNC, &force, FWRITE, FSCRED);
1870 if (error) { 1870 if (error) {
1871 WAPBL_PRINTF(WAPBL_PRINT_ERROR, 1871 WAPBL_PRINTF(WAPBL_PRINT_ERROR,
1872 ("wapbl_write_commit: DIOCCACHESYNC on dev 0x%x " 1872 ("wapbl_write_commit: DIOCCACHESYNC on dev 0x%x "
1873 "returned %d\n", wl->wl_devvp->v_rdev, error)); 1873 "returned %d\n", wl->wl_devvp->v_rdev, error));
1874 } 1874 }
1875 1875
1876 wc->wc_head = head; 1876 wc->wc_head = head;
1877 wc->wc_tail = tail; 1877 wc->wc_tail = tail;
1878 wc->wc_checksum = 0; 1878 wc->wc_checksum = 0;
1879 wc->wc_version = 1; 1879 wc->wc_version = 1;
1880 getnanotime(&ts); 1880 getnanotime(&ts);
1881 wc->wc_time = ts.tv_sec;; 1881 wc->wc_time = ts.tv_sec;
1882 wc->wc_timensec = ts.tv_nsec; 1882 wc->wc_timensec = ts.tv_nsec;
1883 1883
1884 WAPBL_PRINTF(WAPBL_PRINT_WRITE, 1884 WAPBL_PRINTF(WAPBL_PRINT_WRITE,
1885 ("wapbl_write_commit: head = %"PRIdMAX "tail = %"PRIdMAX"\n", 1885 ("wapbl_write_commit: head = %"PRIdMAX "tail = %"PRIdMAX"\n",
1886 (intmax_t)head, (intmax_t)tail)); 1886 (intmax_t)head, (intmax_t)tail));
1887 1887
1888 /* 1888 /*
1889 * XXX if generation will rollover, then first zero 1889 * XXX if generation will rollover, then first zero
1890 * over second commit header before trying to write both headers. 1890 * over second commit header before trying to write both headers.
1891 */ 1891 */
1892 1892
1893 error = wapbl_write(wc, wc->wc_len, wl->wl_devvp, 1893 error = wapbl_write(wc, wc->wc_len, wl->wl_devvp,
1894 wl->wl_logpbn + wc->wc_generation % 2); 1894 wl->wl_logpbn + wc->wc_generation % 2);