btrfs-progs: check: enable repair in lowmem mode
authorSu Yue <suy.fnst@cn.fujitsu.com>
Wed, 23 Aug 2017 01:38:56 +0000 (09:38 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 Oct 2017 18:33:00 +0000 (20:33 +0200)
Turn on the option --repair with --mode==lowmem in btrfs check.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
[ use warning() and adjust wording ]
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-check.c

index 5c822b8..89e12c1 100644 (file)
@@ -13072,12 +13072,10 @@ int cmd_check(int argc, char **argv)
        }
 
        /*
-        * Not supported yet
+        * experimental and dangerous
         */
-       if (repair && check_mode == CHECK_MODE_LOWMEM) {
-               error("low memory mode doesn't support repair yet");
-               exit(1);
-       }
+       if (repair && check_mode == CHECK_MODE_LOWMEM)
+               warning("low-memory mode repair support is only partial");
 
        radix_tree_init();
        cache_tree_init(&root_cache);