From owner-svn-src-all@freebsd.org Thu Nov 16 01:46:57 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 9FEE7DF16BC; Thu, 16 Nov 2017 01:46:57 +0000 (UTC) (envelope-from carpeddiem@gmail.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 605CC66AD4; Thu, 16 Nov 2017 01:46:57 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x231.google.com with SMTP id n134so4060934itg.1; Wed, 15 Nov 2017 17:46:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=G6e9U27kCUHkwk5XctpXi04ZWbahidFSWV7aGEem7nM=; b=k8I17PES1VXBD4mDX6j+u1NUYvF3lNBCQ64iRVQSxcAoS4ufTvle0A+JPPUwJHwTDf Q1DsAzbToZZXI6H98bhjBdm8+mr8OAxzm2C5nGvaVVY0NOddBt5WAIht7wFAOFWMT+5n RLZHaYcSmPjeZQuc2aZ3qWTkkZ+hIbBszLXWQFsVpWXdi9CxmEEI7wJVm4XdqbG9qiao dGMHiDLiC+it7BdWx+G3d1hC3kJEx1VsY4kykhpeGaOA+QyebvLnGQnvE4csIPbe99zM TIFrGIpM1xxH3imf2yTaFAYFK5H+VaqE5De9exntUz79bO13X5xWxu3lcCZmemcsjlIu PoZg== 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=G6e9U27kCUHkwk5XctpXi04ZWbahidFSWV7aGEem7nM=; b=sB4KqXtJfknqeKIrXx0Dr1HuJknkFuBHQgRTpUmEdnWACZ5KvvdTKn3XpBZ2uGE8yp VOtPvBaecUF9c6KpimlmcE5DoevCvimRtIbAl4MeVW/tB8XnkLqH+ODGh+OJsyBZcdqi poeSUBR4DWDEuLREIBp5kr26ONsQ3aJciC0AKbq1wrRtKxZKLikJyXFiz53q5KvVuI+2 DHCvzoolDxLGwanwZkC5iUc0IC9TDodxNAjANEIpP40QFqhkun0e3bx6VCXq0dSyVvpH Pwv3ACpDAYOTtLmShPvEKoqctaA5m3Y43IG8oINhqzOgaWOmO0QwIqO+00vcIM7YVzcG FD1g== X-Gm-Message-State: AJaThX76cn3/ZEnTXZo73trJ04m4fiAcO6xXKr7hi1RQa4FRUcad8GSV DBZxafWpgvBfol79rC675aXgfrWz2gd6p6ahpZgTPg== X-Google-Smtp-Source: AGs4zMYneMa09skqTwYOLQCUErwrLON7XJUW64x37SVXzuav7ZvJm2QKEWGXRKKO9fP3RrhP4hDktgUsiFIw+iMFrG8= X-Received: by 10.36.22.13 with SMTP id a13mr545445ita.69.1510796816614; Wed, 15 Nov 2017 17:46:56 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.14.208 with HTTP; Wed, 15 Nov 2017 17:46:36 -0800 (PST) In-Reply-To: References: <201711151840.vAFIefKV002185@repo.freebsd.org> <201711151847.vAFIlGD9052509@pdx.rh.CN85.dnsmgr.net> From: Ed Maste Date: Wed, 15 Nov 2017 20:46:36 -0500 X-Google-Sender-Auth: elfaNec_QUdqDJBGDzWooPB_zRE Message-ID: Subject: Re: svn commit: r325860 - head/sbin/newfs To: Warner Losh Cc: "Rodney W. Grimes" , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" 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: Thu, 16 Nov 2017 01:46:57 -0000 On 15 November 2017 at 19:36, Warner Losh wrote: > > On Wed, Nov 15, 2017 at 5:05 PM, Ed Maste wrote: >> >> On 15 November 2017 at 13:47, Rodney W. Grimes >> wrote: >> >> Author: emaste >> >> Date: Wed Nov 15 18:40:40 2017 >> >> New Revision: 325860 >> >> URL: https://svnweb.freebsd.org/changeset/base/325860 >> >> >> >> Log: >> >> newfs: warn if newer than kernel >> >> >> >> Creating a UFS filesystem with a newfs newer than the running kernel, >> >> and then mounting that filesystem, can lead to interesting failures. >> >> >> >> Add a safety belt to explicitly warn when newfs is newer than the >> >> running kernel. >> > >> > You should probably make the warning if (newer || older) as >> > either is likely to have interesting side effects, as are >> > mounting ufs file systems on different versions. >> >> Why would an older newfs cause trouble? Forward compatibility should be >> fine > > The only scenario that 'old' would cause problems is that if you did a newfs > with a new binary on a new kernel, mounted the file system, wrote files to > it, then rebooted with an old kernel, mounted the filesystem there, writing > new files to it, and then unmounting and running with a new kernel. Right, but that's not older newfs. AFAICT there's no reason at all for a (newer || older) warning. > I'm not sure that the new safety belt is reasonable. Today it's fine, but > over time it will start producing false-positive warnings since the real > issue is just before/after the cg change, not old/new in general. I'd be > tempted to make a check against newfs being >= 1200046 while the kernel is < > 1200046. There wasn't a specific bump for this change to sys/param.h, but > this version was bumped within a few hours of Kirk's change. Well, we don't in general support using a userland newer than the running kernel, other than on a best-effort basis to facilitate upgrades and development. This one is only a warning so I don't see much harm in leaving it in place, and it would catch any new cases of a similar nature. If such a warning was already in place we might have avoided the issue where our snapshots produced checksum mismatch messages. But I don't have a strong objection to a hardcoded version check.