Module Name: src
Committed By: dholland
Date: Mon Jul 25 05:15:08 UTC 2022
Modified Files:
src/sbin/fsck_ffs: wapbl.c
Log Message:
Fix misleading fsck_ffs messages about wapbl journal replay.
Apparently fsck doesn't have a way to replay it to its internal memory
only. (Someone(TM) should implement this...)
This means that if you use -n, it can't replay the journal. But the
sequence of prints is such that it looks like it did. This is quite
misleading. Add an additional specific warning.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/fsck_ffs/wapbl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/fsck_ffs/wapbl.c
diff -u src/sbin/fsck_ffs/wapbl.c:1.5 src/sbin/fsck_ffs/wapbl.c:1.6
--- src/sbin/fsck_ffs/wapbl.c:1.5 Sat Mar 6 11:31:40 2010
+++ src/sbin/fsck_ffs/wapbl.c Mon Jul 25 05:15:08 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: wapbl.c,v 1.5 2010/03/06 11:31:40 mlelstv Exp $ */
+/* $NetBSD: wapbl.c,v 1.6 2022/07/25 05:15:08 dholland Exp $ */
/*-
* Copyright (c) 2005,2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
#define WAPBL_INTERNAL
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wapbl.c,v 1.5 2010/03/06 11:31:40 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wapbl.c,v 1.6 2022/07/25 05:15:08 dholland Exp $");
#include <sys/stat.h>
#include <sys/time.h>
@@ -92,7 +92,16 @@ replay_wapbl(void)
{
int error;
- if (!nflag) {
+ if (nflag) {
+ /*
+ * XXX: we ought to have a mode where we can replay
+ * the journal to memory, similar to what happens in
+ * the kernel with a readonly mount. For now though
+ * just print that we aren't doing it so as to avoid
+ * lying to the user.
+ */
+ pwarn("CANNOT REPLAY JOURNAL IN -n MODE; continuing anyway\n");
+ } else {
error = wapbl_replay_write(wapbl_replay, 0);
if (error) {
pfatal("UNABLE TO REPLAY JOURNAL BLOCKS");