Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern comments
details: https://anonhg.NetBSD.org/src/rev/03b067f7bec2
branches: trunk
changeset: 772661:03b067f7bec2
user: yamt <yamt%NetBSD.org@localhost>
date: Wed Jan 11 00:11:32 2012 +0000
description:
comments
diffstat:
sys/kern/vfs_wapbl.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diffs (52 lines):
diff -r 9d4cb3cf999f -r 03b067f7bec2 sys/kern/vfs_wapbl.c
--- a/sys/kern/vfs_wapbl.c Tue Jan 10 23:39:11 2012 +0000
+++ b/sys/kern/vfs_wapbl.c Wed Jan 11 00:11:32 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_wapbl.c,v 1.48 2011/12/02 12:38:59 yamt Exp $ */
+/* $NetBSD: vfs_wapbl.c,v 1.49 2012/01/11 00:11:32 yamt Exp $ */
/*-
* Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
#define WAPBL_INTERNAL
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.48 2011/12/02 12:38:59 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.49 2012/01/11 00:11:32 yamt Exp $");
#include <sys/param.h>
#include <sys/bitops.h>
@@ -1956,7 +1956,12 @@
int error;
daddr_t pbn;
- /* XXX Calc checksum here, instead we do this for now */
+ /*
+ * flush disk cache to ensure that blocks we've written are actually
+ * written to the stable storage before the commit header.
+ *
+ * XXX Calc checksum here, instead we do this for now
+ */
wapbl_cache_sync(wl, "1");
wc->wc_head = head;
@@ -1972,6 +1977,8 @@
(intmax_t)head, (intmax_t)tail));
/*
+ * write the commit header.
+ *
* XXX if generation will rollover, then first zero
* over second commit header before trying to write both headers.
*/
@@ -1984,6 +1991,10 @@
if (error)
return error;
+ /*
+ * flush disk cache to ensure that the commit header is actually
+ * written before meta data blocks.
+ */
wapbl_cache_sync(wl, "2");
/*
Home |
Main Index |
Thread Index |
Old Index