Hi,
I have attached a patch (which goes on top of 0.19-10) that makes btrfsck
ignore all options (all parameters that are not a device to scan). While it
might not be perfect it makes btrfsck run on boot without errors for me.
Let me know if it needs changes or improvements.
Thanks,
Sten
Index: btrfs-tools/btrfsck.c
===================================================================
--- btrfs-tools.orig/btrfsck.c 2010-02-08 05:37:15.097132451 +0100
+++ btrfs-tools/btrfsck.c 2010-02-08 05:38:11.585242066 +0100
@@ -2821,9 +2821,21 @@
if (ac < 2)
print_usage();
+ char *file = av[ac - 1];
+ int pos;
+ for( pos = 1; pos < ac; ++pos)
+ {
+ /* ignore all options for now, stop at first device found */
+ if (av[pos][0] != '-')
+ {
+ file = av[pos];
+ break;
+ }
+ }
+
radix_tree_init();
cache_tree_init(&root_cache);
- root = open_ctree(av[1], 0, 0);
+ root = open_ctree(file, 0, 0);
if (root == NULL)
return 1;