Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/lfs Check the superblock version field, and refuse t...



details:   https://anonhg.NetBSD.org/src/rev/c4b8c2f5ee09
branches:  trunk
changeset: 471810:c4b8c2f5ee09
user:      perseant <perseant%NetBSD.org@localhost>
date:      Mon Apr 12 00:47:17 1999 +0000

description:
Check the superblock version field, and refuse to mount the filesystem
if the version number is higher than we know about.  This allows, e.g.,
changes in the format of the ifile, segment size restrictions and boundaries,
etc., which would not affect existing fields in the superblock, but which
would drastically affect the filesystem, to be smoothly integrated at a
later date.

diffstat:

 sys/ufs/lfs/lfs_vfsops.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 762e7041bf35 -r c4b8c2f5ee09 sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c  Mon Apr 12 00:40:06 1999 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c  Mon Apr 12 00:47:17 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vfsops.c,v 1.31 1999/04/11 23:58:17 perseant Exp $ */
+/*     $NetBSD: lfs_vfsops.c,v 1.32 1999/04/12 00:47:17 perseant Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -372,6 +372,7 @@
 
        /* Check the basics. */
        if (dfs->dlfs_magic != LFS_MAGIC || dfs->dlfs_bsize > MAXBSIZE ||
+           dfs->dlfs_version > LFS_VERSION ||
            dfs->dlfs_bsize < sizeof(struct dlfs)) {
                error = EINVAL;         /* XXX needs translation */
                goto out;



Home | Main Index | Thread Index | Old Index