path: root/Documentation
diff options
authorLu Fengqi <>2016-04-24 15:47:12 +0800
committerDavid Sterba <>2016-08-17 19:04:51 +0200
commitbfecd8bd6aafd3be183506e4a351d412f39fc2bc (patch)
tree58247a650c41186195d1498ec6e3610434361710 /Documentation
parentdad817d3bad44619c355d11e39512b413da6939c (diff)
btrfs-progs: check: introduce low memory mode
Introduce a new fsck mode: low memory mode. Old btrfsck is working efficiently but uses some memory for each extent item. This method will ensure extents are only iterated once at extent/chunk tree check process. But since it uses some memory for each extent item, for a large fs with several TB metadata, this can easily eat up memory and cause OOM. To handle such limitation and improve scalability, the new low-memory mode will not use any heap memory to record which extent is checked. Instead it will use extent backref to avoid most of uneeded checks on shared fs/subvolume tree blocks. And with the use forward and backward reference cross check, we can also ensure every tree block is at least checked once. Signed-off-by: Lu Fengqi <> Signed-off-by: Qu Wenruo <> Reviewed-by: Josef Bacik <> Signed-off-by: David Sterba <>
Diffstat (limited to 'Documentation')
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/btrfs-check.asciidoc b/Documentation/btrfs-check.asciidoc
index 74a2ad21..4e27863e 100644
--- a/Documentation/btrfs-check.asciidoc
+++ b/Documentation/btrfs-check.asciidoc
@@ -93,6 +93,12 @@ build the extent tree from scratch
NOTE: Do not use unless you know what you're doing.
+check fs in low memory usage mode(experimental)
+May takes longer time than normal check.
+NOTE: Doesn't work with '--repair' option yet.
*btrfs check* returns a zero exit status if it succeeds. Non zero is