From owner-svn-src-all@freebsd.org Sun Nov 5 15:17:03 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 62224E6DEA3; Sun, 5 Nov 2017 15:17:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 26CF882AF6; Sun, 5 Nov 2017 15:17:02 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.104] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 1C34B10478F8; Mon, 6 Nov 2017 01:46:50 +1100 (AEDT) Date: Mon, 6 Nov 2017 01:46:49 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r324853 - in head/sys: kern sys In-Reply-To: <20171105130349.GZ2566@kib.kiev.ua> Message-ID: <20171106010605.L1257@besplex.bde.org> References: <201710220811.v9M8Bjw5033551@repo.freebsd.org> <20171105014453.L1354@besplex.bde.org> <20171105130349.GZ2566@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=bc8baKHB c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=dJygQ0nzWWpy1se7vO8A:9 a=1V_zddbC5oYsKgxO:21 a=FXTM8E97C0I6whea:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Sun, 05 Nov 2017 15:17:03 -0000 On Sun, 5 Nov 2017, Konstantin Belousov wrote: > On Sun, Nov 05, 2017 at 03:06:22AM +1100, Bruce Evans wrote: >> On Sun, 22 Oct 2017, Konstantin Belousov wrote: >> >>> Author: kib >>> Date: Sun Oct 22 08:11:45 2017 >>> New Revision: 324853 >>> URL: https://svnweb.freebsd.org/changeset/base/324853 >>> >>> Log: >>> Remove the support for mknod(S_IFMT), which created dummy vnodes with >>> VBAD type. >>> >>> FFS ffs_write() VOP catches such vnodes and panics, other VOPs do not >>> check for the type and their behaviour is really undefined. The >>> comment claims that this support was done for 'badsect' to flag bad >>> sectors, we do not have such facility in kernel anyway. >> >> badsect(8) is a utility and this commit breaks it by removing its kernel >> support. > > I see, thank you for the pointer. I will prepare the patch to remove > badsect(8). That would increase the number of things to fix. Even if badsect(8) is implemented less hackishly, binary compatibility for mknod(2) requires ifdefing it with COMPAT_*. I only checked that badsect(*) worked before this commit without INVARIANTS or soft updates. Perhaps the panic always occurs with INVARIANTS due to some INAVRIANTS check being wrong, or soft updates doesn't understand this case. badsect(8) says to run badsect on a "quiet" file system, but this should only be necessary to prevent the bad block being reallocated while you are creating a VBAD file to hold it. Note that mknod(S_IFMT) doesn't force an fsck before the next mount. This seems to be be just another bug involving the clean flag -- I doubt that it is really safe to never clean up the VBAD files, so creating one should have set a sticky dirty flag. Bruce