]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - bcachefs.c
fs_usage cmd fixes
[bcachefs-tools-debian] / bcachefs.c
index 304a01bb0f418a963db22b9a801d3e3bbef86ad6..03ebfd2017e6454b171a01e5a402e6e769af27d2 100644 (file)
@@ -21,6 +21,8 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
+#include <raid/raid.h>
+
 #include "cmds.h"
 
 static void usage(void)
@@ -67,6 +69,8 @@ static void usage(void)
             "  migrate              Migrate an existing filesystem to bcachefs, in place\n"
             "  migrate-superblock   Add default superblock, after bcachefs migrate\n"
             "\n"
+            "Commands for operating on files in a bcachefs filesystem:\n"
+            "  setattr              Set various per file attributes\n"
             "Debug:\n"
             "These commands work on offline, unmounted filesystems\n"
             "  dump                 Dump filesystem metadata to a qcow2 image\n"
@@ -141,6 +145,8 @@ static int data_cmds(int argc, char *argv[])
 
 int main(int argc, char *argv[])
 {
+       raid_init();
+
        full_cmd = argv[0];
 
        setvbuf(stdout, NULL, _IOLBF, 0);
@@ -194,6 +200,14 @@ int main(int argc, char *argv[])
        if (!strcmp(cmd, "list"))
                return cmd_list(argc, argv);
 
+       if (!strcmp(cmd, "setattr"))
+               return cmd_setattr(argc, argv);
+
+#ifdef BCACHEFS_FUSE
+       if (!strcmp(cmd, "fusemount"))
+               return cmd_fusemount(argc, argv);
+#endif
+
        if (!strcmp(cmd, "--help")) {
                usage();
                return 0;