Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145513447
D13114.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D13114.diff
View Options
Index: head/sbin/fsck_ffs/pass5.c
===================================================================
--- head/sbin/fsck_ffs/pass5.c
+++ head/sbin/fsck_ffs/pass5.c
@@ -35,6 +35,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#define IN_RTLD /* So we pickup the P_OSREL defines */
#include <sys/param.h>
#include <sys/sysctl.h>
@@ -73,6 +74,7 @@
newcg->cg_niblk = fs->fs_ipg;
if (preen == 0 && yflag == 0 && fs->fs_magic == FS_UFS2_MAGIC &&
fswritefd != -1 && (fs->fs_metackhash & CK_CYLGRP) == 0 &&
+ getosreldate() >= P_OSREL_CK_CLYGRP &&
reply("ADD CYLINDER GROUP CHECKSUM PROTECTION") != 0) {
fs->fs_metackhash |= CK_CYLGRP;
rewritecg = 1;
Index: head/sbin/newfs/mkfs.c
===================================================================
--- head/sbin/newfs/mkfs.c
+++ head/sbin/newfs/mkfs.c
@@ -44,6 +44,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#define IN_RTLD /* So we pickup the P_OSREL defines */
#include <sys/param.h>
#include <sys/disklabel.h>
#include <sys/file.h>
@@ -495,7 +496,7 @@
/*
* Set flags for metadata that is being check-hashed.
*/
- if (Oflag > 1)
+ if (Oflag > 1 && getosreldate() >= P_OSREL_CK_CLYGRP)
sblock.fs_metackhash = CK_CYLGRP;
/*
Index: head/sbin/newfs/newfs.c
===================================================================
--- head/sbin/newfs/newfs.c
+++ head/sbin/newfs/newfs.c
@@ -398,10 +398,6 @@
if (pp != NULL)
pp->p_size *= secperblk;
}
- if (getosreldate() < __FreeBSD_version) {
- warnx("%s is newer than the running kernel and may not be compatible",
- getprogname());
- }
mkfs(pp, special);
ufs_disk_close(&disk);
if (!jflag)
Index: head/sys/sys/param.h
===================================================================
--- head/sys/sys/param.h
+++ head/sys/sys/param.h
@@ -84,6 +84,7 @@
#define P_OSREL_SHUTDOWN_ENOTCONN 1100077
#define P_OSREL_MAP_GUARD 1200035
#define P_OSREL_WRFSBASE 1200041
+#define P_OSREL_CK_CLYGRP 1200046
#define P_OSREL_VMTOTAL64 1200054
#define P_OSREL_MAJOR(x) ((x) / 100000)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 21, 8:01 PM (20 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28927107
Default Alt Text
D13114.diff (2 KB)
Attached To
Mode
D13114: Add sanity check for CK_CLYGRP
Attached
Detach File
Event Timeline
Log In to Comment