Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern #ifdef DIAGNOSTIC panic ---> KASSERTMSG
details: https://anonhg.NetBSD.org/src/rev/d9133b41bc1f
branches: trunk
changeset: 345040:d9133b41bc1f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue May 03 19:15:29 2016 +0000
description:
#ifdef DIAGNOSTIC panic ---> KASSERTMSG
>From coypu.
diffstat:
sys/kern/vfs_wapbl.c | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
diffs (43 lines):
diff -r 20b8954cd3db -r d9133b41bc1f sys/kern/vfs_wapbl.c
--- a/sys/kern/vfs_wapbl.c Tue May 03 18:22:28 2016 +0000
+++ b/sys/kern/vfs_wapbl.c Tue May 03 19:15:29 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_wapbl.c,v 1.64 2015/11/15 03:09:39 pgoyette Exp $ */
+/* $NetBSD: vfs_wapbl.c,v 1.65 2016/05/03 19:15:29 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.64 2015/11/15 03:09:39 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.65 2016/05/03 19:15:29 riastradh Exp $");
#include <sys/param.h>
#include <sys/bitops.h>
@@ -976,17 +976,14 @@
wl->wl_bufbytes, wl->wl_bcount));
#endif
-#ifdef DIAGNOSTIC
size_t flushsize = wapbl_transaction_len(wl);
- if (flushsize > (wl->wl_circ_size - wl->wl_reserved_bytes)) {
- /*
- * XXX this could be handled more gracefully, perhaps place
- * only a partial transaction in the log and allow the
- * remaining to flush without the protection of the journal.
- */
- panic("wapbl_end: current transaction too big to flush\n");
- }
-#endif
+ /*
+ * XXX this could be handled more gracefully, perhaps place
+ * only a partial transaction in the log and allow the
+ * remaining to flush without the protection of the journal.
+ */
+ KASSERTMSG(flushsize <= (wl->wl_circ_size - wl->wl_reserved_bytes),
+ "wapbl_end: current transaction too big to flush");
mutex_enter(&wl->wl_mtx);
KASSERT(wl->wl_lock_count > 0);
Home |
Main Index |
Thread Index |
Old Index