From owner-svn-src-all@freebsd.org Fri Nov 17 01:00:05 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC451DEF4BC for ; Fri, 17 Nov 2017 01:00:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 631F173221 for ; Fri, 17 Nov 2017 01:00:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id l196so2212027itl.4 for ; Thu, 16 Nov 2017 17:00:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ccro9Dd086CB2ZYec2y8I+NUUz0UXhtmZTxGeOF4e7Q=; b=nwL82dA8YQSdX+X1piAfDiaMgzIhpfajHTWyDlBiDUAcyLbOvN5jqEydLrPfr/otRP StV6JCSGlxlkowmYFesL0SbcwvC2gGbxx9rQjZeIrPhBuAmk5jbfNT3thEcEu9VohSq5 P8p5voudgf+ggD7XNOA//b/ImnXjeVAvnL+Rfox8Ljvsp8MNcJ0AMSSr7IrVvFZJCzHN mADIdYCgbWp3g+D5m8RxjXHRh47pGD3bfGtCKR4YR50F35iAc+7kygVhwTkFbZyjU004 5RJzekgq/MOO+e/jwZf0iwh06zL1mpR4rC6XlfIFZERNeTjpNuzAqRpehzJdyayPanaw MroQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ccro9Dd086CB2ZYec2y8I+NUUz0UXhtmZTxGeOF4e7Q=; b=qSa0O2Lb70aARURQse1R+ir1iP/KMvwVW8fzX9g/Ah+Xnrr61gppHKTqK+rIk0unRc keWh5qtx3G9jajW95pNN9ep4b5uAMAlBorJ7XPFpy/dZRzub9BYiCNZdxRpybaT9g5ek kCka6D2n/nGaSyKhV3pFejDkn9dp5OzvX3LozMDvUmw88vkm/rzn820JbU0Iwq4vfamt +a2Vc7q+GLihNgP0IdInNhRIacEe5ly2gzsUQOnm4SzfVkjRrbQfyuv5tdAeaWK0g6we dsN8Q5TogCQ5wuc7SYww1iFeBiOVrTlEk9HZBTcU1umqyfpzj03I+3EgWtxLefX8bolV jANg== X-Gm-Message-State: AJaThX49pu3EdNEJK/eKhOpVGSzJFaLDhs9MOXbZrhz+N8v/vmHItllC oNXpsSpRHhTc8aHHokg+gXQwt4un4WScos9AWGjGCw== X-Google-Smtp-Source: AGs4zMYPiO3LRCN5FQXaLrOQB8BRcA9UONhz/TjRl4JrBPFXzky8WQJ3DZY1zTcQVyJa11U/WqTT/rlQn290BP5fEzA= X-Received: by 10.36.131.200 with SMTP id d191mr4532620ite.97.1510880404666; Thu, 16 Nov 2017 17:00:04 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Thu, 16 Nov 2017 17:00:03 -0800 (PST) X-Originating-IP: [2607:fb90:6f58:7260:61d4:94db:35c5:eb2a] Received: by 10.79.108.204 with HTTP; Thu, 16 Nov 2017 17:00:03 -0800 (PST) In-Reply-To: <201711162324.vAGNONIg058059@pdx.rh.CN85.dnsmgr.net> References: <201711162128.vAGLSEpZ019174@repo.freebsd.org> <201711162324.vAGNONIg058059@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Thu, 16 Nov 2017 18:00:03 -0700 X-Google-Sender-Auth: Mz1O13NZkgVUUJfkAyQ7vj7nojQ Message-ID: Subject: Re: svn commit: r325903 - in head: sbin/fsck_ffs sbin/newfs sys/sys To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 01:00:05 -0000 On Nov 16, 2017 4:24 PM, "Rodney W. Grimes" wrote: [ Charset UTF-8 unsupported, converting... ] > Author: imp > Date: Thu Nov 16 21:28:14 2017 > New Revision: 325903 > URL: https://svnweb.freebsd.org/changeset/base/325903 > > Log: > Only try to enable CK_CLYGRP if we're running on kernel newer than > 1200046, the first version that supports this feature. If we set it, > then use an old kernel, we'll break the 'contract' of having > checksummed cylinder groups this flag signifies. To avoid creating > something with an inconsistent state, don't turn the flag on in these > cases. The first full fsck with a new kernel will turn this on. I would much rather have to force this flag on, then my problem would for the most part just go away, I can move file systems back and forth between kernels without any problems. Having fsck just turn it on without even a message let alone a way to stop it being turned on increases the pain factor. That's a request for Kirk. I'm not changing his design for this detail. If it helps, it is only with some options it is turned on.... it only does this for non preen -p, non -y runs. Warner > Spnsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D13114 > > Modified: > head/sbin/fsck_ffs/pass5.c > head/sbin/newfs/mkfs.c > head/sbin/newfs/newfs.c > head/sys/sys/param.h > > Modified: head/sbin/fsck_ffs/pass5.c > ============================================================ ================== > --- head/sbin/fsck_ffs/pass5.c Thu Nov 16 19:07:19 2017 (r325902) > +++ head/sbin/fsck_ffs/pass5.c Thu Nov 16 21:28:14 2017 (r325903) > @@ -35,6 +35,7 @@ static const char sccsid[] = "@(#)pass5.c 8.9 (Berkele > #include > __FBSDID("$FreeBSD$"); > > +#define IN_RTLD /* So we pickup the P_OSREL defines */ > #include > #include > > @@ -73,6 +74,7 @@ pass5(void) > 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; > > Modified: head/sbin/newfs/mkfs.c > ============================================================ ================== > --- head/sbin/newfs/mkfs.c Thu Nov 16 19:07:19 2017 (r325902) > +++ head/sbin/newfs/mkfs.c Thu Nov 16 21:28:14 2017 (r325903) > @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)mkfs.c 8.11 (Berkeley) 5/3 > #include > __FBSDID("$FreeBSD$"); > > +#define IN_RTLD /* So we pickup the P_OSREL defines */ > #include > #include > #include > @@ -495,7 +496,7 @@ restart: > /* > * 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; > > /* > > Modified: head/sbin/newfs/newfs.c > ============================================================ ================== > --- head/sbin/newfs/newfs.c Thu Nov 16 19:07:19 2017 (r325902) > +++ head/sbin/newfs/newfs.c Thu Nov 16 21:28:14 2017 (r325903) > @@ -398,10 +398,6 @@ main(int argc, char *argv[]) > 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) > > Modified: head/sys/sys/param.h > ============================================================ ================== > --- head/sys/sys/param.h Thu Nov 16 19:07:19 2017 (r325902) > +++ head/sys/sys/param.h Thu Nov 16 21:28:14 2017 (r325903) > @@ -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) > > -- Rod Grimes rgrimes@freebsd.org