Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Soft updates

From Wikipedia, the free encyclopedia
Approach to maintaining file system

Soft updates is an approach to maintainingfile systemmetadata integrity in the event of a crash or power outage. Soft updates work by tracking and enforcing dependencies among updates to file system metadata. Soft updates are an alternative to the more commonly used approach ofjournaling file systems.

Method of operation

[edit]

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 updates code will always provide the disk a consistent version of the metadata (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 togarbage collect any allocated space that has been orphaned. This also permits the file system 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

[edit]

FreeBSD supports soft updates for theUFS file system[1] 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 thenewfs command.[2] They can be disabled or enabled anytime thereafter with an option to thetunefs command.[3] FreeBSD 9.0 introduced a journaling supplement to soft updates for the purpose of eliminating a backgroundfsck for garbage collection after a crash.[4][5]

OpenBSD supported soft updates for the FFS file system until the release 7.4 (2023), at which time it was disabled.[6]

NetBSD supported soft updates until the 6.0 release (2012) at which time it was deprecated in favor ofWAPBL journaling.[7]

Comparison to journaling file systems

[edit]

Neither journaling nor soft updates guarantees that no data will be lost, but they do make sure that the file system 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

[edit]

References

[edit]
  1. ^McKusick, Marshall Kirk; Neville-Neil, George V. (2005). "8.6".The Design and Implementation of the FreeBSD Operating System.Addison-Wesley.ISBN 978-0321968975.
  2. ^"newfs(8)".FreeBSD. 2017-07-07. Retrieved2019-02-02.
  3. ^"tunefs(8)". FreeBSD. 2016-04-19. Retrieved2019-02-02.
  4. ^"FreeBSD 9.0-RELEASE Release Notes". FreeBSD. 2012-01-12. Retrieved2019-02-02.
  5. ^McKusick, Marshall Kirk; Roberson, Jeff (2010-01-23)."Journaled Soft-updates"(PDF). Retrieved2019-02-02.
  6. ^"Soft updates disabled for future VFS work".OpenBSD_Journal. 2023-07-05. Retrieved2024-03-09.
  7. ^"Announcing NetBSD 6.0".NetBSD. 2012-10-17. Retrieved2019-02-02.

External links

[edit]
TheFreeBSD Project
FreeBSD
Subsystems
Scheduling
Virtualisation
Storage
Networking
Other
People
Derivatives
open-source
proprietary
Operating system
OS-level virtualisation
File systems,storage
Firewalls,networking
Subsystems
People
TheOpenBSD Project
Operating system
Related projects
People
Organizations
Publications
Disk and
non-rotating
Optical disc
Flash memory andSSD
host-sidewear leveling
Distributed parallel
NAS
Specialized
Pseudo
Encrypted
Types
Features
Access control
Interfaces
Lists
Layouts
Retrieved from "https://en.wikipedia.org/w/index.php?title=Soft_updates&oldid=1324331088"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp