summaryrefslogtreecommitdiff
path: root/sys/ufs/ffs/ffs_vfsops.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2006-04-12 03:46:53 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2006-04-12 03:46:53 +0000
commita1bfd55dab8334da77d8b539961b9238311eba77 (patch)
tree5154d554f147775f23f410ac6edb77e1486e9c8d /sys/ufs/ffs/ffs_vfsops.c
parent493ab464c7d12e52852f0a8ff6d3c26ebb9b5582 (diff)
revert the new superblock format. it violates the rule that new
kernels and old tools are safe. i'm leaving in the "updated" flag, so that fsck will continue to remove it from filesystems. the kernel no longer attempts to upgrade superblocks and will use the old format. post-mortem discussions have concluded that maybe jamming ffs2 fields into random locations in the superblock is asking for trouble, and we need to talk about this some more. my bad for not thinking fast enough.
Diffstat (limited to 'sys/ufs/ffs/ffs_vfsops.c')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c51
1 files changed, 1 insertions, 50 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 629d2e6eeb2..3784a2f2fad 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vfsops.c,v 1.90 2006/04/07 11:11:38 pedro Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.91 2006/04/12 03:46:52 tedu Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -69,9 +69,6 @@ int ffs_reload_vnode(struct vnode *, void *);
int ffs_sync_vnode(struct vnode *, void *);
int ffs_validate(struct fs *);
-void ffs1_compat_read(struct fs *, struct ufsmount *, ufs2_daddr_t);
-void ffs1_compat_write(struct fs *, struct ufsmount *);
-
const struct vfsops ffs_vfsops = {
ffs_mount,
ufs_start,
@@ -790,8 +787,6 @@ ffs_mountfs(struct vnode *devvp, struct mount *mp, struct proc *p)
bp = NULL;
fs = ump->um_fs;
- ffs1_compat_read(fs, ump, sbloc);
-
fs->fs_ronly = ronly;
size = fs->fs_cssize;
blks = howmany(size, fs->fs_fsize);
@@ -939,48 +934,6 @@ ffs_oldfscompat(struct fs *fs)
}
/*
- * Auxiliary function for reading FFS1 super blocks.
- */
-void
-ffs1_compat_read(struct fs *fs, struct ufsmount *ump, ufs2_daddr_t sbloc)
-{
- if (fs->fs_magic == FS_UFS2_MAGIC)
- return; /* UFS2 */
-
- if (fs->fs_ffs1_flags & FS_FLAGS_UPDATED)
- return; /* Already updated */
-
- fs->fs_flags = fs->fs_ffs1_flags;
- fs->fs_sblockloc = sbloc;
- fs->fs_maxbsize = fs->fs_bsize;
- fs->fs_time = fs->fs_ffs1_time;
- fs->fs_size = fs->fs_ffs1_size;
- fs->fs_dsize = fs->fs_ffs1_dsize;
- fs->fs_csaddr = fs->fs_ffs1_csaddr;
- fs->fs_cstotal.cs_ndir = fs->fs_ffs1_cstotal.cs_ndir;
- fs->fs_cstotal.cs_nbfree = fs->fs_ffs1_cstotal.cs_nbfree;
- fs->fs_cstotal.cs_nifree = fs->fs_ffs1_cstotal.cs_nifree;
- fs->fs_cstotal.cs_nffree = fs->fs_ffs1_cstotal.cs_nffree;
- fs->fs_ffs1_flags |= FS_FLAGS_UPDATED;
-}
-
-/*
- * Auxiliary function for writing FFS1 super blocks.
- */
-void
-ffs1_compat_write(struct fs *fs, struct ufsmount *ump)
-{
- if (fs->fs_magic != FS_UFS1_MAGIC)
- return; /* UFS2 */
-
- fs->fs_ffs1_time = fs->fs_time;
- fs->fs_ffs1_cstotal.cs_ndir = fs->fs_cstotal.cs_ndir;
- fs->fs_ffs1_cstotal.cs_nbfree = fs->fs_cstotal.cs_nbfree;
- fs->fs_ffs1_cstotal.cs_nifree = fs->fs_cstotal.cs_nifree;
- fs->fs_ffs1_cstotal.cs_nffree = fs->fs_cstotal.cs_nffree;
-}
-
-/*
* unmount system call
*/
int
@@ -1457,8 +1410,6 @@ ffs_sbupdate(struct ufsmount *mp, int waitfor)
} /* XXX */
dfs->fs_maxfilesize = mp->um_savedmaxfilesize; /* XXX */
- ffs1_compat_write(dfs, mp);
-
if (waitfor != MNT_WAIT)
bawrite(bp);
else if ((error = bwrite(bp)))