Date: Fri, 27 Oct 2017 20:22:24 +0200 From: Stefan Esser <se@freebsd.org> To: Mark Johnston <markj@FreeBSD.org>, freebsd-fs@FreeBSD.org Subject: Re: softdep as a mount(8) option Message-ID: <4d7a735b-c7b3-8fa0-dbea-36e3b0d54191@freebsd.org> In-Reply-To: <20171027153859.GC2385@raichu> References: <20171027153859.GC2385@raichu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4d7a735b-c7b3-8fa0-dbea-36e3b0d54191>