Page MenuHomeFreeBSD

D13114.id35309.diff
No OneTemporary

D13114.id35309.diff

Index: sbin/fsck_ffs/pass5.c
===================================================================
--- sbin/fsck_ffs/pass5.c
+++ sbin/fsck_ffs/pass5.c
@@ -73,6 +73,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() >= FREEBSD_VERS_CYLGRP &&
reply("ADD CYLINDER GROUP CHECKSUM PROTECTION") != 0) {
fs->fs_metackhash |= CK_CYLGRP;
rewritecg = 1;
Index: sbin/newfs/mkfs.c
===================================================================
--- sbin/newfs/mkfs.c
+++ sbin/newfs/mkfs.c
@@ -495,7 +495,7 @@
/*
* Set flags for metadata that is being check-hashed.
*/
- if (Oflag > 1)
+ if (Oflag > 1 && getosreldate() >= FREEBSD_VERS_CYLGRP)
sblock.fs_metackhash = CK_CYLGRP;
/*
Index: sbin/newfs/newfs.c
===================================================================
--- sbin/newfs/newfs.c
+++ 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: sys/ufs/ffs/fs.h
===================================================================
--- sys/ufs/ffs/fs.h
+++ sys/ufs/ffs/fs.h
@@ -453,6 +453,9 @@
#define CK_INODE 0x0004 /* inodes */
#define CK_INDIR 0x0008 /* indirect blocks */
#define CK_DIR 0x0010 /* directory contents */
+
+#define FREEBSD_VERS_CYLGRP 1200046 /* First version with CK_CYLGRP */
+
/*
* The BX_FSPRIV buffer b_xflags are used to track types of data in buffers.
*/

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 22, 4:54 AM (15 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25911054
Default Alt Text
D13114.id35309.diff (1 KB)

Event Timeline