mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-06 13:09:50 +00:00
Include files missed in 329051.
This commit is contained in:
parent
068beacf21
commit
31461aa2f1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329052
@ -315,6 +315,7 @@ extern int Zflag; /* zero empty data blocks */
|
||||
extern int inoopt; /* trim out unused inodes */
|
||||
extern char ckclean; /* only do work if not cleanly unmounted */
|
||||
extern int cvtlevel; /* convert to newer file system format */
|
||||
extern int ckhashadd; /* check hashes to be added */
|
||||
extern int bkgrdcheck; /* determine if background check is possible */
|
||||
extern int bkgrdsumadj; /* whether the kernel have ability to adjust superblock summary */
|
||||
extern char usedsoftdep; /* just fix soft dependency inconsistencies */
|
||||
|
@ -87,6 +87,7 @@ int Zflag; /* zero empty data blocks */
|
||||
int inoopt; /* trim out unused inodes */
|
||||
char ckclean; /* only do work if not cleanly unmounted */
|
||||
int cvtlevel; /* convert to newer file system format */
|
||||
int ckhashadd; /* check hashes to be added */
|
||||
int bkgrdcheck; /* determine if background check is possible */
|
||||
int bkgrdsumadj; /* whether the kernel have ability to adjust superblock summary */
|
||||
char usedsoftdep; /* just fix soft dependency inconsistencies */
|
||||
|
@ -43,6 +43,7 @@ static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/14/95";
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#define IN_RTLD /* So we pickup the P_OSREL defines */
|
||||
#include <sys/param.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/mount.h>
|
||||
@ -440,7 +441,46 @@ checkfilesys(char *filesys)
|
||||
flush(fswritefd, &sblk);
|
||||
fsmodified = ofsmodified;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the filesystem was run on an old kernel that did not
|
||||
* support check hashes, clear the check-hash flags so that
|
||||
* we do not try to verify them.
|
||||
*/
|
||||
if ((sblock.fs_flags & FS_METACKHASH) == 0)
|
||||
sblock.fs_metackhash = 0;
|
||||
/*
|
||||
* If we are running on a kernel that can provide check hashes
|
||||
* that are not yet enabled for the filesystem and we are
|
||||
* running manually without the -y flag, offer to add any
|
||||
* supported check hashes that are not already enabled.
|
||||
*/
|
||||
ckhashadd = 0;
|
||||
if (preen == 0 && yflag == 0 && sblock.fs_magic != FS_UFS1_MAGIC &&
|
||||
fswritefd != -1 && getosreldate() >= P_OSREL_CK_CYLGRP) {
|
||||
if ((sblock.fs_metackhash & CK_CYLGRP) == 0 &&
|
||||
reply("ADD CYLINDER GROUP CHECK-HASH PROTECTION") != 0)
|
||||
ckhashadd |= CK_CYLGRP;
|
||||
#ifdef notyet
|
||||
if ((sblock.fs_metackhash & CK_SUPERBLOCK) == 0 &&
|
||||
getosreldate() >= P_OSREL_CK_SUPERBLOCK &&
|
||||
reply("ADD SUPERBLOCK CHECK-HASH PROTECTION") != 0)
|
||||
ckhashadd |= CK_SUPERBLOCK;
|
||||
if ((sblock.fs_metackhash & CK_INODE) == 0 &&
|
||||
getosreldate() >= P_OSREL_CK_INODE &&
|
||||
reply("ADD INODE CHECK-HASH PROTECTION") != 0)
|
||||
ckhashadd |= CK_INODE;
|
||||
if ((sblock.fs_metackhash & CK_INDIR) == 0 &&
|
||||
getosreldate() >= P_OSREL_CK_INDIR &&
|
||||
reply("ADD INDIRECT BLOCK CHECK-HASH PROTECTION") != 0)
|
||||
ckhashadd |= CK_INDIR;
|
||||
if ((sblock.fs_metackhash & CK_DIR) == 0 &&
|
||||
getosreldate() >= P_OSREL_CK_DIR &&
|
||||
reply("ADD DIRECTORY CHECK-HASH PROTECTION") != 0)
|
||||
ckhashadd |= CK_DIR;
|
||||
#endif /* notyet */
|
||||
if (ckhashadd != 0)
|
||||
sblock.fs_flags |= FS_METACKHASH;
|
||||
}
|
||||
/*
|
||||
* Cleared if any questions answered no. Used to decide if
|
||||
* the superblock should be marked clean.
|
||||
|
Loading…
Reference in New Issue
Block a user