Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/sbin/fsck_ffs Pull up revisions 1.72-1.73 (requested by...
details: https://anonhg.NetBSD.org/src/rev/4777a86ef4f7
branches: netbsd-2-0
changeset: 560550:4777a86ef4f7
user: jdc <jdc%NetBSD.org@localhost>
date: Tue Apr 27 17:51:53 2004 +0000
description:
Pull up revisions 1.72-1.73 (requested by dbj in ticket #185)
Fix problems related to superblock upgrade issues which may be
experienced by -current users from 2003.
diffstat:
sbin/fsck_ffs/setup.c | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
diffs (51 lines):
diff -r 16c7b825326c -r 4777a86ef4f7 sbin/fsck_ffs/setup.c
--- a/sbin/fsck_ffs/setup.c Tue Apr 27 17:51:23 2004 +0000
+++ b/sbin/fsck_ffs/setup.c Tue Apr 27 17:51:53 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setup.c,v 1.70 2004/03/21 20:01:41 dsl Exp $ */
+/* $NetBSD: setup.c,v 1.70.2.1 2004/04/27 17:51:53 jdc Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setup.c 8.10 (Berkeley) 5/9/95";
#else
-__RCSID("$NetBSD: setup.c,v 1.70 2004/03/21 20:01:41 dsl Exp $");
+__RCSID("$NetBSD: setup.c,v 1.70.2.1 2004/04/27 17:51:53 jdc Exp $");
#endif
#endif /* not lint */
@@ -191,13 +191,31 @@
sblock->fs_old_flags |= FS_FLAGS_UPDATED;
/* Disable the postbl tables */
sblock->fs_old_cpc = 0;
- sblock->fs_old_nrpos = 0;
+ sblock->fs_old_nrpos = 1;
sblock->fs_old_trackskew = 0;
/* The other fields have already been updated by
* sb_oldfscompat_read
*/
sbdirty();
}
+ if (!is_ufs2 && cvtlevel == 3 &&
+ (sblock->fs_old_flags & FS_FLAGS_UPDATED)) {
+ if (preen)
+ pwarn("DOWNGRADING TO OLD SUPERBLOCK LAYOUT\n");
+ else if (!reply("DOWNGRADE TO OLD SUPERBLOCK LAYOUT"))
+ return(0);
+ sblock->fs_old_flags &= ~FS_FLAGS_UPDATED;
+ sb_oldfscompat_write(sblock, sblock);
+ sblock->fs_old_flags &= ~FS_FLAGS_UPDATED; /* just in case */
+ /* Leave postbl tables disabled, but blank its superblock region anyway */
+ sblock->fs_old_postblformat = FS_DYNAMICPOSTBLFMT;
+ sblock->fs_old_cpc = 0;
+ sblock->fs_old_nrpos = 1;
+ sblock->fs_old_trackskew = 0;
+ memset(&sblock->fs_old_postbl_start, 0xff, 256);
+ sb_oldfscompat_read(sblock, &sblocksave);
+ sbdirty();
+ }
/*
* Check and potentially fix certain fields in the super block.
*/
Home |
Main Index |
Thread Index |
Old Index