Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Turn WAPBL_DEBUG panic or KASSERT into KASSERTMSG
details: https://anonhg.NetBSD.org/src/rev/864ed70aac03
branches: trunk
changeset: 345106:864ed70aac03
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat May 07 20:18:44 2016 +0000
description:
Turn WAPBL_DEBUG panic or KASSERT into KASSERTMSG
>From coypu.
diffstat:
sys/kern/vfs_wapbl.c | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diffs (41 lines):
diff -r 1cc4f2b64084 -r 864ed70aac03 sys/kern/vfs_wapbl.c
--- a/sys/kern/vfs_wapbl.c Sat May 07 20:16:38 2016 +0000
+++ b/sys/kern/vfs_wapbl.c Sat May 07 20:18:44 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_wapbl.c,v 1.71 2016/05/07 20:16:38 riastradh Exp $ */
+/* $NetBSD: vfs_wapbl.c,v 1.72 2016/05/07 20:18:44 riastradh 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.71 2016/05/07 20:16:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.72 2016/05/07 20:18:44 riastradh Exp $");
#include <sys/param.h>
#include <sys/bitops.h>
@@ -1650,16 +1650,12 @@
wapbl_advance_head(wl->wl_circ_size, wl->wl_circ_off, flushsize,
&head, &tail);
-#ifdef WAPBL_DEBUG
- if (head != off) {
- panic("lost head! head=%"PRIdMAX" tail=%" PRIdMAX
- " off=%"PRIdMAX" flush=%zu",
- (intmax_t)head, (intmax_t)tail, (intmax_t)off,
- flushsize);
- }
-#else
- KASSERT(head == off);
-#endif
+
+ KASSERTMSG(head == off,
+ "lost head! head=%"PRIdMAX" tail=%" PRIdMAX
+ " off=%"PRIdMAX" flush=%zu",
+ (intmax_t)head, (intmax_t)tail, (intmax_t)off,
+ flushsize);
/* Opportunistically move the tail forward if we can */
if (!wapbl_lazy_truncate) {
Home |
Main Index |
Thread Index |
Old Index