HOME

TheInfoList



OR:

Soft updates is an approach to maintaining
file system In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
meta-data integrity in the event of a crash or power outage. Soft updates work by tracking and enforcing dependencies among updates to file system meta-data. Soft updates are an alternative to the more commonly used approach of
journaling file system A journaling file system is a file system that keeps track of changes not yet committed to the file system's main part by recording the goal of such changes in a data structure known as a "journal", which is usually a circular log. In the even ...
s.


Method of operation

Soft updates allow only asynchronous
metadata Metadata is "data that provides information about other data", but not the content of the data, such as the text of a message or the image itself. There are many distinct types of metadata, including: * Descriptive metadata – the descriptive ...
writes that do not render the on-disk file system inconsistent, or that the only inconsistency that ever happens is a storage space leak (space marked allocated when not used by any file). It avoids having to do ordered synchronous metadata writes by temporarily "rolling back" any part of a metadata block that depends on another potentially non-flushed or partially rolled-back block when writing it. In effect, blocks may be flushed at any time and the soft-update code will always provide the disk a consistent version of it (as long as it knows which blocks have physically been flushed). Recovery then simply becomes a matter of running a background walk of the file system when it is next mounted to garbage collect any allocated space that has been orphaned. This also permits the filesystem to selectively flush certain files without having to flush all metadata blocks or all of the records. Data that is unlinked from the metadata dependency graph before writing it to disk has begun does not need to be written to disk at all. For example, creating a file, using it for a short period of time, and then deleting it may cause no disk activity at all. Soft updates require periodic flushing of the metadata to nonvolatile storage.


Implementations

FreeBSD FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
supports soft updates for the UFS file system and they have been enabled by default during installation for many years. Soft updates are manually enabled or disabled during file system creation with an option to the newfs command. They can be disabled or enabled anytime thereafter with an option to the tunefs command. FreeBSD 9.0 introduced a journaling supplement to soft updates for the purpose of eliminating a background fsck for garbage collection after a crash. However, enabling journaling on a filesystem with soft updates disables the ability to make filesystem snapshots. This may cause issues when filesystems are dumped with the -L option, as snapshots are used to guarantee filesystem coherency during the dump.
OpenBSD OpenBSD is a security-focused, free and open-source, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by forking NetBSD 1.0. According to the website, the OpenBSD project em ...
supports soft updates for the FFS file system. Soft updates are enabled when the file system is mounted by exercising an option to the mount command.
NetBSD NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is a ...
supported soft updates until the 6.0 release (2012) at which time it was deprecated in favor of
WAPBL __NOTOC__ Write Ahead Physical Block Logging (WAPBL) provides meta data journaling for file systems in conjunction with Fast File System (FFS) to accomplish rapid filesystem consistency after an unclean shutdown of the filesystem and better gener ...
journaling.


Comparison to journaling file systems

Neither journaling nor soft updates guarantees that no data will be lost, but they do make sure that the filesystem remains consistent. An advantage of a file system with soft updates is that it can be mounted immediately after a crash, since there is no log replay.


Notes

* * * *


External links

* Marshall Kirk McKusick
Information about Soft Updates, Snapshots, and Back-ground Fsck


References

{{File systems , state=expanded Berkeley Software Distribution BSD software Computer file systems Disk file systems FreeBSD DragonFly BSD OpenBSD Unix file system technology