From owner-freebsd-fs@freebsd.org Fri Oct 27 18:22:38 2017 Return-Path: <owner-freebsd-fs@freebsd.org> Delivered-To: freebsd-fs@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 5BFE4E4E025 for <freebsd-fs@mailman.ysv.freebsd.org>; Fri, 27 Oct 2017 18:22:38 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout07.t-online.de (mailout07.t-online.de [194.25.134.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1AE9372BAE; Fri, 27 Oct 2017 18:22:37 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd29.aul.t-online.de (fwd29.aul.t-online.de [172.20.26.134]) by mailout07.t-online.de (Postfix) with SMTP id 14184425EEAC; Fri, 27 Oct 2017 20:22:29 +0200 (CEST) Received: from Stefans-MBP-2.fritz.box (ZwgTmZZEZh5zxIny947n0+8Yqy1ah-4J+VSyJ9rxSNbSbRuJ2yJn+I+9PnzEA3fQmZ@[84.154.121.171]) by fwd29.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1e89Gz-2Rde8u0; Fri, 27 Oct 2017 20:22:25 +0200 Subject: Re: softdep as a mount(8) option To: Mark Johnston <markj@FreeBSD.org>, freebsd-fs@FreeBSD.org References: <20171027153859.GC2385@raichu> From: Stefan Esser <se@freebsd.org> Message-ID: <4d7a735b-c7b3-8fa0-dbea-36e3b0d54191@freebsd.org> Date: Fri, 27 Oct 2017 20:22:24 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171027153859.GC2385@raichu> Content-Type: text/plain; charset=windows-1252 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-ID: ZwgTmZZEZh5zxIny947n0+8Yqy1ah-4J+VSyJ9rxSNbSbRuJ2yJn+I+9PnzEA3fQmZ X-TOI-MSGID: 2ae47868-80ed-4231-877b-7edd2233cc76 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems <freebsd-fs.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs/> List-Post: <mailto:freebsd-fs@freebsd.org> List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-fs>, <mailto:freebsd-fs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 27 Oct 2017 18:22:38 -0000 Am 27.10.17 um 17:39 schrieb Mark Johnston: > Hi, > > I'd like to finally enable the use of SU (not SU+J) on some small UFS > filesystems. The fact that SU is enabled using a flag in the superblock > poses a problem for me, however: the systems containing these > filesystems may at any time be repurposed to run a kernel that supports > SU but contains bugs[*] that render it unusable. I therefore can't > persistently enable SU in these systems. > > I'm wondering if it would be possible to enable SU using a mount > option rather than with a persistent flag. fsck_ffs conditionalizes some > of its logic on whether SU is configured - is this necessary for > correctness? That is, if I run fsck on an unclean filesystem that had > been mounted with SU, and fsck runs as though SU hadn't been configured, > what problems might arise? Yes, this is not only possible, I have implemented this functionality more than 10 years, ago I and have used it for many years, but later converted all systems to ZFS and thus lost interest. My reasoning was just as yours: Whether a file-system was last mounted with SU enabled is relevant for FSCK, but not for the next mount. If a file-system with SU enabled in the superblock is mounted on a system that does not support SU in the kernel, then FSCK will assume that the SU consistency guarantees are given, while they are not. At the time, I in fact hat got agreement from Kirk McKusck, that the mount option ought to be the way SU should be enabled, but I could not get agreement in the project to commit those patches (one reason being, that NetBSD used the tunefs method and that FreeBSD should not diverge, IIRC). Anyway, my patches do still exist and apply - but the the addition of journalling changed the picture. Now there are 3 modes: plain UFS, UFS with SU and UFS with SU+, and I have not attempted to add support for SU+. I had maintained these patches some time after last using it, I guess they cleanly apply to FreeBSD-10, not sure about later versions. And as I said, they did not even try to cover SU+ ... Regards, STefan