Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Allow tunefs to clear any type of WAPBL log, not only in-fil...
details: https://anonhg.NetBSD.org/src/rev/22faf1d212f9
branches: trunk
changeset: 747390:22faf1d212f9
user: bouyer <bouyer%NetBSD.org@localhost>
date: Sun Sep 13 14:13:23 2009 +0000
description:
Allow tunefs to clear any type of WAPBL log, not only in-filesystem
ones. Discussed in
http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005896.html
and followups.
diffstat:
sbin/tunefs/tunefs.c | 22 +++++++++++-----------
sys/ufs/ffs/ffs_wapbl.c | 6 +++---
2 files changed, 14 insertions(+), 14 deletions(-)
diffs (77 lines):
diff -r 14baabb1cd68 -r 22faf1d212f9 sbin/tunefs/tunefs.c
--- a/sbin/tunefs/tunefs.c Sun Sep 13 09:17:26 2009 +0000
+++ b/sbin/tunefs/tunefs.c Sun Sep 13 14:13:23 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tunefs.c,v 1.40 2009/08/17 21:28:24 bouyer Exp $ */
+/* $NetBSD: tunefs.c,v 1.41 2009/09/13 14:13:23 bouyer Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)tunefs.c 8.3 (Berkeley) 5/3/95";
#else
-__RCSID("$NetBSD: tunefs.c,v 1.40 2009/08/17 21:28:24 bouyer Exp $");
+__RCSID("$NetBSD: tunefs.c,v 1.41 2009/09/13 14:13:23 bouyer Exp $");
#endif
#endif /* not lint */
@@ -353,15 +353,6 @@
break;
}
- if (!in_fs_log)
- errx(1, "Can't change size of non-in-filesystem log");
-
- if (logfilesize > 0 && old_size == (uint64_t)logfilesize) {
- /* no action */
- warnx("log file size remains unchanged at %lld", logfilesize);
- return;
- }
-
if (logfilesize == 0) {
/*
* Don't clear out the locators - the kernel might need
@@ -374,6 +365,15 @@
return;
}
+ if (!in_fs_log && logfilesize > 0 && old_size > 0)
+ errx(1, "Can't change size of non-in-filesystem log");
+
+ if (old_size == logfilesize && logfilesize > 0) {
+ /* no action */
+ warnx("log file size remains unchanged at %lld", logfilesize);
+ return;
+ }
+
if (old_size == 0) {
/* create new log of desired size next mount */
sblock.fs_journal_location = UFS_WAPBL_JOURNALLOC_IN_FILESYSTEM;
diff -r 14baabb1cd68 -r 22faf1d212f9 sys/ufs/ffs/ffs_wapbl.c
--- a/sys/ufs/ffs/ffs_wapbl.c Sun Sep 13 09:17:26 2009 +0000
+++ b/sys/ufs/ffs/ffs_wapbl.c Sun Sep 13 14:13:23 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_wapbl.c,v 1.12 2009/02/22 20:28:06 ad Exp $ */
+/* $NetBSD: ffs_wapbl.c,v 1.13 2009/09/13 14:13:23 bouyer Exp $ */
/*-
* Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.12 2009/02/22 20:28:06 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.13 2009/09/13 14:13:23 bouyer Exp $");
#define WAPBL_INTERNAL
@@ -275,7 +275,7 @@
default:
printf("ffs_wapbl: unknown journal type %d\n",
fs->fs_journal_location);
- return EINVAL;
+ break;
}
Home |
Main Index |
Thread Index |
Old Index