]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - bcachefs.c
Fix python test_list
[bcachefs-tools-debian] / bcachefs.c
index 2ade9d81671d76f671f2502e1f5b059dc21ce51f..239b114723831cb630d837c95bcf36f6e58b9cb9 100644 (file)
@@ -31,51 +31,56 @@ static void usage(void)
             "usage: bcachefs <command> [<args>]\n"
             "\n"
             "Superblock commands:\n"
-            "  format               Format a new filesystem\n"
-            "  show-super           Dump superblock information to stdout\n"
+            "  format                   Format a new filesystem\n"
+            "  show-super               Dump superblock information to stdout\n"
             "\n"
             "Repair:\n"
-            "  fsck                 Check an existing filesystem for errors\n"
+            "  fsck                     Check an existing filesystem for errors\n"
             "\n"
             "Startup/shutdown, assembly of multi device filesystems:\n"
 #if 0
-            "  assemble             Assemble an existing multi device filesystem\n"
-            "  incremental          Incrementally assemble an existing multi device filesystem\n"
-            "  run                  Start a partially assembled filesystem\n"
-            "  stop                   Stop a running filesystem\n"
+            "  assemble                 Assemble an existing multi device filesystem\n"
+            "  incremental              Incrementally assemble an existing multi device filesystem\n"
+            "  run                      Start a partially assembled filesystem\n"
+            "  stop                     Stop a running filesystem\n"
 #endif
             "\n"
             "Commands for managing a running filesystem:\n"
-            "  fs usage             Show disk usage\n"
+            "  fs usage                 Show disk usage\n"
             "\n"
             "Commands for managing devices within a running filesystem:\n"
-            "  device add           Add a new device to an existing filesystem\n"
-            "  device remove        Remove a device from an existing filesystem\n"
-            "  device online        Re-add an existing member to a filesystem\n"
-            "  device offline       Take a device offline, without removing it\n"
-            "  device evacuate      Migrate data off of a specific device\n"
-            "  device set-state     Mark a device as failed\n"
-            "  device resize        Resize filesystem on a device\n"
+            "  device add               Add a new device to an existing filesystem\n"
+            "  device remove            Remove a device from an existing filesystem\n"
+            "  device online            Re-add an existing member to a filesystem\n"
+            "  device offline           Take a device offline, without removing it\n"
+            "  device evacuate          Migrate data off of a specific device\n"
+            "  device set-state         Mark a device as failed\n"
+            "  device resize            Resize filesystem on a device\n"
+            "  device journal-resize    Resize journal on a device\n"
             "\n"
             "Commands for managing filesystem data:\n"
-            "  data rereplicate     Rereplicate degraded data\n"
+            "  data rereplicate         Rereplicate degraded data\n"
+            "  data job                 Kick off low level data jobs\n"
             "\n"
             "Encryption:\n"
-            "  unlock               Unlock an encrypted filesystem prior to running/mounting\n"
-            "  set-passphrase       Change passphrase on an existing (unmounted) filesystem\n"
-            "  remove-passphrase    Remove passphrase on an existing (unmounted) filesystem\n"
+            "  unlock                   Unlock an encrypted filesystem prior to running/mounting\n"
+            "  set-passphrase           Change passphrase on an existing (unmounted) filesystem\n"
+            "  remove-passphrase        Remove passphrase on an existing (unmounted) filesystem\n"
             "\n"
             "Migrate:\n"
-            "  migrate              Migrate an existing filesystem to bcachefs, in place\n"
-            "  migrate-superblock   Add default superblock, after bcachefs migrate\n"
+            "  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"
-            "  list                 List filesystem metadata in textual form\n"
+            "  dump                     Dump filesystem metadata to a qcow2 image\n"
+            "  list                     List filesystem metadata in textual form\n"
+            "  list_journal             List contents of journal\n"
             "\n"
             "Miscellaneous:\n"
-            "  version              Display the version of the invoked bcachefs tool\n");
+            "  version                  Display the version of the invoked bcachefs tool\n");
 }
 
 static char *full_cmd;
@@ -125,6 +130,8 @@ static int device_cmds(int argc, char *argv[])
                return cmd_device_set_state(argc, argv);
        if (!strcmp(cmd, "resize"))
                return cmd_device_resize(argc, argv);
+       if (!strcmp(cmd, "resize-journal"))
+               return cmd_device_resize_journal(argc, argv);
 
        usage();
        return 0;
@@ -136,6 +143,8 @@ static int data_cmds(int argc, char *argv[])
 
        if (!strcmp(cmd, "rereplicate"))
                return cmd_data_rereplicate(argc, argv);
+       if (!strcmp(cmd, "job"))
+               return cmd_data_job(argc, argv);
 
        usage();
        return 0;
@@ -197,6 +206,16 @@ int main(int argc, char *argv[])
                return cmd_dump(argc, argv);
        if (!strcmp(cmd, "list"))
                return cmd_list(argc, argv);
+       if (!strcmp(cmd, "list_journal"))
+               return cmd_list_journal(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();