
F.A.Q.
p. 257
•
Copy on Write Logging
Data and metadata in BTRfs are protected with copy on write logging (COW). Once the transaction
that allocated the space on disk has committed, any new writes to that logical address in the file or
btree will go to a newly allocated block, and block pointers in the btrees and super blocks will be
updated to reflect the new location.
Some of the BTRfs trees do not use reference counting for their allocated space. This includes the
root tree, and the extent trees. As blocks are replaced in these trees, the old block is freed in the
extent tree. These blocks are not reused for other purposes until the transaction that freed them
commits.
All subvolume (and snapshot) trees are reference counted. When a COW operation is performed on
a btree node, the reference count of all the blocks it points to is increased by one. For leaves, the
reference counts of any file extents in the leaf are increased by one. When the transaction commits,
a new root pointer is inserted in the root tree for each new subvolume root. The key used has the
form:
Subvolume inode number BTRfs_ROOT_ITEM_KEY Transaction ID
The updated btree blocks are all flushed to disk, and then the super block is updated to point to the
new root tree. Once the super block has been properly written to disk, the transaction is considered
complete. At this time the root tree has two pointers for each subvolume changed during the
transaction. One item points to the new tree and one points to the tree that existed at the start of
the last transaction.
Any time after the commit finishes, the older subvolume root items may be removed. The reference
count on the subvolume root block is lowered by one. If the reference count reaches zero, the block
is freed and the reference count on any nodes the root points to is lowered by one. If a tree node
or leaf can be freed, it is traversed to free the nodes or extents below it in the tree in a depth first
fashion.
The traversal and freeing of the tree may be done in pieces by inserting a progress record in the
root tree. The progress record indicates the last key and level touched by the traversal so the current
transaction can commit and the traversal can resume in the next transaction. If the system crashes
before the traversal completes, the progress record is used to safely delete the root on the next
mount.
Содержание G-RACK 12
Страница 1: ......
Страница 2: ...Copyrights...
Страница 4: ...Introduction...
Страница 9: ...Getting Started...
Страница 12: ...Getting Started p 12 Front View Rear View...
Страница 31: ...Getting Started p 31 All settings can be changed manually in the G RACK 12 Administrative Tool at any time...
Страница 32: ...Administrative Tool...
Страница 41: ...Administrative Tool p 41 Delete Workspace To delete a workspace highlight the workspace and click Delete button...
Страница 48: ...Administrative Tool p 48 Extended information from smartctl utility...
Страница 77: ...Administrative Tool p 77 SMB CIFS Workspaces Add a workspace that will connect via SMB CIFS service...
Страница 92: ...Administrative Tool p 92 Comment Optional comment text box...
Страница 109: ...Administrative Tool p 109 Example error message...
Страница 124: ...Administrative Tool p 124 Memory usage Network interfaces...
Страница 130: ...Hardware Description...
Страница 159: ...Use Cases Tutorials...
Страница 180: ...Use Cases Tutorials p 180...
Страница 184: ...Use Cases Tutorials p 184 You need to click the enable slider to activate this option...
Страница 191: ...Use Cases Tutorials p 191 Lastly a review is presented before the shares are created...
Страница 192: ...Use Cases Tutorials p 192 Once you confirm the process starts...
Страница 215: ...Use Cases Tutorials p 215 6 The RAID is ready...
Страница 221: ...iSCSI Essentials...
Страница 228: ...iSCSI Essentials p 228 Links and references https en wikipedia org wiki ISCSI...
Страница 234: ...Troubleshooting...
Страница 247: ...F A Q...
Страница 272: ...Technical Support Warranty...
Страница 283: ...Glossary...
Страница 289: ...Appendices...