erofs-utils: correct the default number of workers in the usage
authorGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 15 May 2024 17:22:34 +0000 (01:22 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 16 May 2024 16:32:18 +0000 (00:32 +0800)
Fixes: 59c36e7a4008 ("erofs-utils: mkfs: use all available processors by default")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240515172236.661035-1-hsiangkao@linux.alibaba.com
mkfs/main.c

index 4c3620de777dd4b80bf74cafe19490bbdbc189b6..c26cb56b72118a710fc4b0480286e7b38af623d6 100644 (file)
@@ -187,7 +187,7 @@ static void usage(int argc, char **argv)
                "                       (and optionally dump the raw stream to X together)\n"
 #endif
 #ifdef EROFS_MT_ENABLED
-               " --workers=#           set the number of worker threads to # (default=1)\n"
+               " --workers=#           set the number of worker threads to # (default: %u)\n"
 #endif
                " --xattr-prefix=X      X=extra xattr name prefix\n"
                " --mount-point=X       X=prefix of target fs path (default: /)\n"
@@ -198,7 +198,10 @@ static void usage(int argc, char **argv)
                " --fs-config-file=X    X=fs_config file\n"
                " --block-list-file=X   X=block_list file\n"
 #endif
-               );
+#ifdef EROFS_MT_ENABLED
+               , erofs_get_available_processors() /* --workers= */
+#endif
+       );
 }
 
 static void version(void)