Date: Thu, 10 Feb 2005 16:21:15 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Scott Long <scottl@freebsd.org> Subject: Re: Journalling FS and Soft Updates comparision Message-ID: <20050210222114.GA40240@dan.emsphone.com> Resent-Message-ID: <20050210222308.GA47039@dan.emsphone.com> In-Reply-To: <420AD3A7.3000102@freebsd.org> References: <20050210030119.GD29396@alzatex.com> <420AD3A7.3000102@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 10), Scott Long said: > > journal completed. Soft updates are simply a way to order meta > > data so that it happens in a safe order. An example is moving file > > a from directory x to directory y would first delete file a from > > dir x, then add it to dir y. If a crash happens in the middle, then > > the data becomes lost right? > > Part of the reordering of metadata in softupdates involves generating > dependency graphs that prevent data loss like this. Also, note that softupdates' only job is to guarantee that the on-disk filesystem layout is consistent. There is no guarantee that multiple independant metadata changes will be written to disk in the same order they were made. Due to the consistency rule, adding inodes to directories is done first for things like file deletions, and last for file creation. A directory tree with lots of file creation and deletion happening in it at the time of a reboot will tend to lose files (relative to a userland application's view of the fs) when it is remounted. > Softupdates really aren't a whole lot different from journalling. > Both turn metadata operations into a sequence of ordered atomic > updates. The only difference is that journalling writes these > updates to the on-disk journal right away and then commits them later > on, and softupdates keeps (most of) them in RAM and then commits them > later on. This is the big drawback to softupdates for me. You run the risk of losing the last `sysctl kern.metadelay` seconds worth of files, because of all the state that softupdates keeps in RAM. -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050210222114.GA40240>