* [PATCH 1/2] erofs-utils: correct the default number of workers in the usage
@ 2024-05-15 17:22 Gao Xiang
2024-05-15 17:23 ` [PATCH 2/2] erofs-utils: pretty root directory progressinfo Gao Xiang
0 siblings, 1 reply; 2+ messages in thread
From: Gao Xiang @ 2024-05-15 17:22 UTC (permalink / raw
To: linux-erofs; +Cc: Gao Xiang
Fixes: 59c36e7a4008 ("erofs-utils: mkfs: use all available processors by default")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
mkfs/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkfs/main.c b/mkfs/main.c
index 4c3620d..455c152 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -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,7 @@ 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
- );
+ , erofs_get_available_processors() /* --workers= */);
}
static void version(void)
--
2.39.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] erofs-utils: pretty root directory progressinfo
2024-05-15 17:22 [PATCH 1/2] erofs-utils: correct the default number of workers in the usage Gao Xiang
@ 2024-05-15 17:23 ` Gao Xiang
0 siblings, 0 replies; 2+ messages in thread
From: Gao Xiang @ 2024-05-15 17:23 UTC (permalink / raw
To: linux-erofs; +Cc: Gao Xiang
Avoid `Processing ...` or `file dumped (mode 40755)`..
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
lib/inode.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/inode.c b/lib/inode.c
index 8ec87e6..67a572d 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -1405,10 +1405,11 @@ static int erofs_rebuild_handle_directory(struct erofs_inode *dir)
static int erofs_mkfs_handle_inode(struct erofs_inode *inode)
{
+ const char *relpath = erofs_fspath(inode->i_srcpath);
char *trimmed;
int ret;
- trimmed = erofs_trim_for_progressinfo(erofs_fspath(inode->i_srcpath),
+ trimmed = erofs_trim_for_progressinfo(relpath[0] ? relpath : "/",
sizeof("Processing ...") - 1);
erofs_update_progressinfo("Processing %s ...", trimmed);
free(trimmed);
@@ -1442,8 +1443,7 @@ static int erofs_mkfs_handle_inode(struct erofs_inode *inode)
} else {
ret = erofs_mkfs_handle_directory(inode);
}
- erofs_info("file %s dumped (mode %05o)", erofs_fspath(inode->i_srcpath),
- inode->i_mode);
+ erofs_info("file /%s dumped (mode %05o)", relpath, inode->i_mode);
return ret;
}
--
2.39.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-15 17:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-15 17:22 [PATCH 1/2] erofs-utils: correct the default number of workers in the usage Gao Xiang
2024-05-15 17:23 ` [PATCH 2/2] erofs-utils: pretty root directory progressinfo Gao Xiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).