Date: Fri, 14 Mar 2014 12:40:25 -0400 From: Richard Yao <ryao@gentoo.org> To: Dieter BSD <dieterbsd@gmail.com>, freebsd-hackers@freebsd.org Subject: Re: GSoC proposition: multiplatform UFS2 driver Message-ID: <532330F9.3060106@gentoo.org> In-Reply-To: <CAA3ZYrCPJ1AydSS9n4dDBMFjHh5Ug6WDvTzncTtTw4eYrmcywg@mail.gmail.com> References: <CAA3ZYrCPJ1AydSS9n4dDBMFjHh5Ug6WDvTzncTtTw4eYrmcywg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --I5ARswVNIOQmkb4vheC1qdX5e1cn1KwFQ Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/13/2014 10:22 PM, Dieter BSD wrote: > IIRC, "UFS" means both FFS and LFS, so is the plan to do both? >=20 > Malware with a good fs bolted on is still malware, so why bother? >=20 > The "fine" penguinix fs trashes data (I gave up on penguinix > because of this), so adding proper FFS support could in theory be > useful someday. If you want that today, you can have it by using ZFSOnLinux. > Julio writes, >> That being said, I do not like the idea of using NetBSD's UFS2 code. I= t >> lacks Soft-Updates, which I consider to make FreeBSD UFS2 second only = to >> ZFS in desirability. >=20 > FFS has been in production use for decades. ZFS is still wet behind th= e ears. > Older versions of NetBSD have soft updates, and they work fine for me. > I believe that NetBSD 6.0 is the first release without soft updates. T= hey > claimed that soft updates was "too difficult" to maintain. I find that= > soft updates are *essential* for data integrity (I don't know *why*, I'= m not > a FFS guru). There are bug fixes in FreeBSD's FFS that were likely nev= er > fixed in NetBSD's version, even after having FreeBSD's fix pointed out = to them. > Of course it is possible that Net fixed bugs that haven't been fixed in= > Free as well. >=20 > Speaking of bugs, the first step should be to fix the open PRs. >=20 > I recall something about certain newfs options being unusable because > of something to do with kernel data structures. Using the resulting > fs would panic (or was it hang? I forget) the kernel. I believe that > problem was fixed, but when testing this on other OSes, be sure to > dial various newfs options up to 11 and then use the fs heavily. Imagine a vibration that causes a hard drive to write a sector into the wrong location on disk, which happens to be a metadata structure. That is known as a "Misdirected Write" and I suspect many reports of issues on UFS2 can be traced to things like it based on my superficial understanding of what Kirk McKusick accomplished with Soft Updates. This is why ZFS stores duplicate data and checksums in a disk format that is a merkle tree. UFS2 was designed under the assumption that such things do not happen. Unless UFS2 is modified to do the same, it is not its fault when something goes wrong because it was used in a place where this happens. These deficiencies become strengths when you consider a virtual machine backed by a ZFS zvol. Using UFS as the virtual machine's root filesystem avoids IO amplification caused by two levels of CoW, yet the virtual machine is still able to seamlessly recover in the event of a kernel panic (or worse, the host going down). Snapshots and backup can be managed from the host side with little fear of consistency violations. UFS2 SU+J on a ZFS zvol is a combination that can only be surpassed by virtfs at this time. However, that comes with a major caveat. While you avoid double caching and excessive layering with virtfs, you lose the potential ability that UFS2 SU+J had to coalesce guest context switches by doing multiple IOs in a single transition. That being said, I should note that virtio-blk likely needs to be checked to ensure that it is able to do this. I have a suspicion that it cannot based on users reports of performance problems and first hand experience in FreeBSD 9.0 that confirms it. The slides in the below link provide actual numbers. http://www.slideshare.net/TakeshiHasegawa1/runningfreebsdonlinuxkvm I have confirmation from users that this is still a problem in FreeBSD 10. It occurred to me that IO coalescing might be an explanation for this problem just now. I have no time to examine this possibility, so anyone who cares that is reading this should not expect me to explore it.= --I5ARswVNIOQmkb4vheC1qdX5e1cn1KwFQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTIzD/AAoJECDuEZm+6Exk8pYP/RfbclEv/NiTMhe/5a5niFWS 87MBNqWR+yMWyrISB/+l7pSXS+MCnnLWO/OTgTni3sd/hrtJS6JTZh2TliXe2VeH ePjoHZDFKTAHl2DAxF4MRvZZOlheZKc5ahenalwFIxU29ehenlfmjtkwUyQneIkr 34O26CCoyKeHg71xpAaUBDcEy4DHxpjZ++QJV5/nUuccdCvA3B6G8H3BAazAQpWd KlcEXlxMEvT6KzbSSIElUcF0hbs0+IqAdHwpMkkeHth00cC+2/qRgj8dv2wvndSA aLrZ735eH3QGa2k1KpR/9WxyggR1sWvdUVs7HrdWjOCrFFYfRJnCEXfA+nzHC8Ga ABJJfF4wSM7ZEMDVvdI+wP/c8BceElm3F4s2PgGlSUUHgBZbBfHYCgXMTMpQVGta 9uDvPwqZYXm/zpiV6O+m78p3CNld7sCuPRxtHFW+dDPAeQ9iWyaYqdwM/QIQStVE aqt1NLPeDQG773eiy505YqMQnyYt+XzAULm71pLe2jHpFJlS/mBMH1OwCh300jNZ XLP5fLJ0nX6KQNjQwoO6MYxyF5I/wMEYYuAR2ee6JsFD8wgXfEokZ7yGsctmWQVp dJjEH1SBTMtkL/RALFrKg8dN6cyItpz3a0tL0eJtBDJKUYDD58NDm6Q/bwoPk3+z x6T3YdwB6zJVABe/BENq =04SF -----END PGP SIGNATURE----- --I5ARswVNIOQmkb4vheC1qdX5e1cn1KwFQ--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?532330F9.3060106>