Last active
May 7, 2016 19:53
-
-
Save coypoop/bddd512276ee37cf9ae4362accb1f71f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 9e0db7a82b84ab427d1485975a77205b3627a184 Mon Sep 17 00:00:00 2001 | |
From: coypu <coypu@sdf.org> | |
Date: Sat, 7 May 2016 22:52:55 +0300 | |
Subject: [PATCH 1/1] Turn WAPBL_DEBUG panic or KASSERT into KASSERTMSG | |
--- | |
sys/kern/vfs_wapbl.c | 16 ++++++---------- | |
1 file changed, 6 insertions(+), 10 deletions(-) | |
diff --git a/sys/kern/vfs_wapbl.c b/sys/kern/vfs_wapbl.c | |
index de64ef4..425a4b0 100644 | |
--- a/sys/kern/vfs_wapbl.c | |
+++ b/sys/kern/vfs_wapbl.c | |
@@ -1526,16 +1526,12 @@ wapbl_flush(struct wapbl *wl, int waitfor) | |
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) { | |
-- | |
2.8.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment