Difference between revisions of "Btrfs"

m
wording
m (wording)
m (wording)
Line 438: Line 438:
* Files are appended at the end of a "data page"
* Files are appended at the end of a "data page"
* Metadata is appended at a "metadata page"
* Metadata is appended at a "metadata page"
* Inside a page nothing is ever overwritten
* Inside a page '''nothing is ever overwritten'''
* When a page is full the file system will use the next free page
* When a page is full the file system will use the next free page
* Deleting a file does not write/clean its data, but writes metadata, that marks this file as deleted
* Deleting a file does not write/clean its data, but writes metadata, that marks this file as deleted
* Overwriting a file does first append the new file to the "data page", then writes the metadata for this file
* Overwriting a file does first append the new file to the actual "data page", then appends the metadata for this file to the "metadata page".
* Changing small parts of a file will write only the new parts, then link the rest to the old file
* Changing small parts of a file will write only the new parts, then ''link'' the rest to the old file
* there are checksums for data and metadata
* there are checksums for data and metadata


==== Downsides ====
==== Downsides ====
* Management of space is complex
* Management of space is complex
* There are 2 sorts of pages
* There are 2 sorts of pages (data / metadata)
* There has to be a clean-up-process who makes the space of deleted files reusable, so that the disk does not run out of free pages
* There has to be a clean-up-process who makes the space of deleted files reusable, so that the disk does not run out of free pages
* It must be avoided to write data unnecessarily, because then the clean-up would also be very expensive
* It must be avoided to write data unnecessarily, because then the clean-up would also be very expensive


==== (Dis)advantages ====
==== Advantages ====
* It is possible to detect nearly any corruption because of the checksums
* It is possible to '''detect''' nearly any '''corruption''' because of the checksums
** When the power is lost, or the disk is disconnected, all old data is save. WHY?
* When the power is lost, or the disk is disconnected, all old data is save. WHY?
** Every bit of "old" data from before the power loss or the disconnection is present because it is NOT overwritten
** Every bit of "old" data from before the power loss or the disconnection is present because it is '''NOT overwritten'''
** Only the newly written data may be partly damaged
** Only the newly written data may be partly damaged
** The metadata may also be partly damaged
** The metadata may also be partly damaged
** When mounting the volume it is possible by analysing checksums and metadata to find the point in the file system where all was good
** When mounting the volume it is possible by analyzing checksums and metadata to find the point in the filesystem where all was good
** Btrfs will automatically roll back to this point, then it can mount the file system writeable
** Btrfs will '''automatically roll back''' to this point, then it can mount the file system writable


* CoW is a sound foundation to build upon
* CoW is a sound foundation to build upon
translator
1,001

edits