diff options
author | mckusick <mckusick@FreeBSD.org> | 2002-11-30 19:04:57 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2002-11-30 19:04:57 +0000 |
commit | 69c6a0dc687e0f11c69951c8c320ced702e379c2 (patch) | |
tree | adf50f37673636f89867aa0f36e80909fa39441a /sys | |
parent | c1f52553a2c9f7f5e5b248b7bc964e61bcfd82ad (diff) | |
download | FreeBSD-src-69c6a0dc687e0f11c69951c8c320ced702e379c2.zip FreeBSD-src-69c6a0dc687e0f11c69951c8c320ced702e379c2.tar.gz |
Add a check to disable the previous patch so that future filesystems
that choose to place their superblocks in non-standard locations will
not get them smashed.
Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 568b992..be0326e 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1478,12 +1478,14 @@ ffs_sbupdate(mp, waitfor) */ if (allerror) return (allerror); - if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_sblockloc != SBLOCK_UFS1) { + if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_sblockloc != SBLOCK_UFS1 && + (fs->fs_flags & FS_FLAGS_UPDATED) == 0) { printf("%s: correcting fs_sblockloc from %jd to %d\n", fs->fs_fsmnt, fs->fs_sblockloc, SBLOCK_UFS1); fs->fs_sblockloc = SBLOCK_UFS1; } - if (fs->fs_magic == FS_UFS2_MAGIC && fs->fs_sblockloc != SBLOCK_UFS2) { + if (fs->fs_magic == FS_UFS2_MAGIC && fs->fs_sblockloc != SBLOCK_UFS2 && + (fs->fs_flags & FS_FLAGS_UPDATED) == 0) { printf("%s: correcting fs_sblockloc from %jd to %d\n", fs->fs_fsmnt, fs->fs_sblockloc, SBLOCK_UFS2); fs->fs_sblockloc = SBLOCK_UFS2; |