Last active
May 18, 2016 23:33
-
-
Save coypoop/49d115fe146708308f5cd7b0fa0a6074 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 b38c8f160e90c033408fe9dd3073e1f2151b5349 Mon Sep 17 00:00:00 2001 | |
From: coypu <coypu@sdf.org> | |
Date: Thu, 19 May 2016 02:32:42 +0300 | |
Subject: [PATCH 1/1] Replace deprecated disabled code by comment | |
describing what it intends to do, and why it won't work yet | |
--- | |
sys/kern/vfs_wapbl.c | 34 ++++------------------------------ | |
1 file changed, 4 insertions(+), 30 deletions(-) | |
diff --git a/sys/kern/vfs_wapbl.c b/sys/kern/vfs_wapbl.c | |
index e63f228..41797f0 100644 | |
--- a/sys/kern/vfs_wapbl.c | |
+++ b/sys/kern/vfs_wapbl.c | |
@@ -1431,44 +1431,18 @@ wapbl_biodone(struct buf *bp) | |
#endif | |
if (bp->b_error) { | |
-#ifdef notyet /* Can't currently handle possible dirty buffer reuse */ | |
/* | |
- * XXXpooka: interfaces not fully updated | |
- * Note: this was not enabled in the original patch | |
- * against netbsd4 either. I don't know if comment | |
- * above is true or not. | |
+ * If an error occurs, it would be nice to leave the buffer | |
+ * as a delayed write on the LRU queue so that we can retry | |
+ * it later. But buffercache(9) can't handle dirty buffer | |
+ * reuse, so just mark the log permanently errored out. | |
*/ | |
- | |
- /* | |
- * If an error occurs, report the error and leave the | |
- * buffer as a delayed write on the LRU queue. | |
- * restarting the write would likely result in | |
- * an error spinloop, so let it be done harmlessly | |
- * by the syncer. | |
- */ | |
- bp->b_flags &= ~(B_DONE); | |
- simple_unlock(&bp->b_interlock); | |
- | |
- if (we->we_error == 0) { | |
- mutex_enter(&wl->wl_mtx); | |
- wl->wl_error_count++; | |
- mutex_exit(&wl->wl_mtx); | |
- cv_broadcast(&wl->wl_reclaimable_cv); | |
- } | |
- we->we_error = bp->b_error; | |
- bp->b_error = 0; | |
- brelse(bp); | |
- return; | |
-#else | |
- /* For now, just mark the log permanently errored out */ | |
- | |
mutex_enter(&wl->wl_mtx); | |
if (wl->wl_error_count == 0) { | |
wl->wl_error_count++; | |
cv_broadcast(&wl->wl_reclaimable_cv); | |
} | |
mutex_exit(&wl->wl_mtx); | |
-#endif | |
} | |
/* | |
-- | |
2.8.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment