|
|
This article includes a list of references, but its sources remain unclear because it has insufficient inline citations. (June 2011) |
Soft updates is an approach to maintaining file system 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 systems.
Contents |
Soft updates allow only asynchronous metadata 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.
FreeBSD supports soft updates for the UFS file system[1] and 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.[2] Soft updates can disabled or enabled anytime thereafter with an option to the tunefs command.[3] FreeBSD 9.0 introduced a journaling supplement to soft updates for the purpose of eliminating a background fsck for garbage collection after a crash.[4][5]
OpenBSD supports soft updates for the UFS file system. Soft updates are enabled when the file system is mounted by exercising an option to the mount command.[6]
NetBSD supported soft updates until the 6.0 release at which time it was deprecated in favor of journaling.[7]
Neither journaling, nor soft updates guarantee 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.
|
|||||||||||||||||
From dreamcicl...
From Najwa...
From karlocamero
From kenjonbro
From marsmet532
From Najwa...
From Michael...
From misterbisson
From ீ ๑ Adam
From meg's my...
From doustpaul...
From DailyCraft
From DailyCraft
From luis perez
From leslie.ke...
From leslie.ke...
From leslie.ke...
From leslie.ke...
From leslie.ke...
From Aisyla...
From Live♥Laug...
From amanky
From Juan G....
From meg's my...
From BloOwITt
From leslie.ke...
From leslie.ke...
From leslie.ke...
From leslie.ke...
From meg's my...
From Lucy_Hill
From Thomas Hawk
From xstex
From romana klee
From Moto@Club4AG
From Kmeron
From Kmeron
From Kmeron
From Kmeron
From Kmeron
From Kmeron
From Kmeron
From Kmeron
From doustpaul...
From Kmeron
From rburtzel
From Rob {dwm}
From Rob {dwm}
From Bill Liao
From Pictimili...
From Shawn Econo
From Kmeron
From Kmeron
From Kmeron
From Kmeron
From Kmeron
From Kmeron
From Kmeron
From Kmeron
From Kmeron
Here you can share your comments or contribute with more information, content, resources or links about this topic.