* [PATCH 1/3] erofs-utils: mkfs: rearrange arguments
@ 2021-09-27 15:03 Gao Xiang
2021-09-27 15:04 ` [PATCH 2/3] erofs-utils: erofs_drop_directly_bhops for blob remapping Gao Xiang
2021-09-27 15:04 ` [PATCH 3/3] erofs-utils: manpage: fix style Gao Xiang
0 siblings, 2 replies; 3+ messages in thread
From: Gao Xiang @ 2021-09-27 15:03 UTC (permalink / raw)
To: linux-erofs
1) rearrange usage();
2) rearrange argument list.
Signed-off-by: Gao Xiang <xiang@kernel.org>
---
some minor cleanups.
mkfs/main.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/mkfs/main.c b/mkfs/main.c
index b61205dac91a..beba6eb8b905 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -72,16 +72,18 @@ static void usage(void)
{
fputs("usage: [options] FILE DIRECTORY\n\n"
"Generate erofs image from DIRECTORY to FILE, and [options] are:\n"
- " -zX[,Y] X=compressor (Y=compression level, optional)\n"
- " -C# specify the size of compress physical cluster in bytes\n"
" -d# set output message level to # (maximum 9)\n"
" -x# set xattr tolerance to # (< 0, disable xattrs; default 2)\n"
+ " -zX[,Y] X=compressor (Y=compression level, optional)\n"
+ " -C# specify the size of compress physical cluster in bytes\n"
" -EX[,...] X=extended options\n"
" -T# set a fixed UNIX timestamp # to all files\n"
#ifdef HAVE_LIBUUID
" -UX use a given filesystem UUID\n"
#endif
- " --chunksize=X generate chunk-based files with X-byte chunks\n"
+ " --all-root make all files owned by root\n"
+ " --chunksize=# generate chunk-based files with #-byte chunks\n"
+ " --compress-hints=X specify a file to configure per-file compression strategy\n"
" --exclude-path=X avoid including file X (X = exact literal path)\n"
" --exclude-regex=X avoid including files that match X (X = regular expression)\n"
#ifdef HAVE_LIBSELINUX
@@ -89,10 +91,8 @@ static void usage(void)
#endif
" --force-uid=# set all file uids to # (# = UID)\n"
" --force-gid=# set all file gids to # (# = GID)\n"
- " --all-root make all files owned by root\n"
" --help display this help and exit\n"
" --max-extent-bytes=# set maximum decompressed extent size # in bytes\n"
- " --compress-hints=X specify a file to configure per-file compression strategy\n"
#ifndef NDEBUG
" --random-pclusterblks randomize pclusterblks for big pcluster (debugging only)\n"
#endif
@@ -180,7 +180,7 @@ static int mkfs_parse_options_cfg(int argc, char *argv[])
char *endptr;
int opt, i;
- while ((opt = getopt_long(argc, argv, "d:x:z:E:T:U:C:",
+ while ((opt = getopt_long(argc, argv, "C:E:T:U:d:x:z:",
long_options, NULL)) != -1) {
switch (opt) {
case 'z':
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] erofs-utils: erofs_drop_directly_bhops for blob remapping
2021-09-27 15:03 [PATCH 1/3] erofs-utils: mkfs: rearrange arguments Gao Xiang
@ 2021-09-27 15:04 ` Gao Xiang
2021-09-27 15:04 ` [PATCH 3/3] erofs-utils: manpage: fix style Gao Xiang
1 sibling, 0 replies; 3+ messages in thread
From: Gao Xiang @ 2021-09-27 15:04 UTC (permalink / raw)
To: linux-erofs
Easier to understand, no real impact.
Signed-off-by: Gao Xiang <xiang@kernel.org>
---
lib/blobchunk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/blobchunk.c b/lib/blobchunk.c
index 725b5173a598..661c5d0121a8 100644
--- a/lib/blobchunk.c
+++ b/lib/blobchunk.c
@@ -193,7 +193,7 @@ int erofs_blob_remap(void)
remapped_base = erofs_blknr(pos_out);
ret = erofs_copy_file_range(fileno(blobfile), &pos_in,
erofs_devfd, &pos_out, length);
- bh->op = &erofs_skip_write_bhops;
+ bh->op = &erofs_drop_directly_bhops;
erofs_bdrop(bh, false);
return ret < length ? -EIO : 0;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] erofs-utils: manpage: fix style
2021-09-27 15:03 [PATCH 1/3] erofs-utils: mkfs: rearrange arguments Gao Xiang
2021-09-27 15:04 ` [PATCH 2/3] erofs-utils: erofs_drop_directly_bhops for blob remapping Gao Xiang
@ 2021-09-27 15:04 ` Gao Xiang
1 sibling, 0 replies; 3+ messages in thread
From: Gao Xiang @ 2021-09-27 15:04 UTC (permalink / raw)
To: linux-erofs
Fix some style in mkfs.erofs.1
Signed-off-by: Gao Xiang <xiang@kernel.org>
---
man/mkfs.erofs.1 | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/man/mkfs.erofs.1 b/man/mkfs.erofs.1
index 3c250c118168..c7829c3f1c8f 100644
--- a/man/mkfs.erofs.1
+++ b/man/mkfs.erofs.1
@@ -63,6 +63,23 @@ Set the universally unique identifier (UUID) of the filesystem to
The format of the UUID is a series of hex digits separated by hyphens,
like this: "c1b9d5a2-f162-11cf-9ece-0020afc76f16".
.TP
+.B \-\-all-root
+Make all files owned by root.
+.TP
+.BI "\-\-chunksize " #
+Generate chunk-based files with #-byte chunks.
+.TP
+.BI "\-\-compress-hints " file
+If the optional
+.BI "\-\-compress-hints " file
+argument is given,
+.B mkfs.erofs
+uses it to apply the per-file compression strategy. Each line is defined by
+tokens separated by spaces in the following form:
+.RS 1.2i
+<pcluster-in-bytes> <match-pattern>
+.RE
+.TP
.BI "\-\-exclude-path=" path
Ignore file that matches the exact literal path.
You may give multiple `--exclude-path' options.
@@ -80,28 +97,11 @@ Set all file uids to \fIUID\fR.
.BI "\-\-force-gid=" GID
Set all file gids to \fIGID\fR.
.TP
-.B \-\-all-root
-Make all files owned by root.
-.TP
-.BI "\-\-chunksize " #
-Generate chunk-based files with #-byte chunks.
-.TP
.B \-\-help
Display this help and exit.
.TP
-.B \-\-max-extent-bytes #
+.BI "\-\-max-extent-bytes " #
Specify maximum decompressed extent size # in bytes.
-.TP
-.BI "\-\-compress-hints " file
-If the optional
-.BI "\-\-compress-hints " file
-argument is given,
-.B mkfs.erofs
-uses it to apply the per-file compression strategy. Each line is defined by
-tokens separated by spaces in the following form:
-.RS 1.2i
-<pcluster-in-bytes> <match-pattern>
-.RE
.SH AUTHOR
This version of \fBmkfs.erofs\fR is written by Li Guifu <blucerlee@gmail.com>,
Miao Xie <miaoxie@huawei.com> and Gao Xiang <xiang@kernel.org> with
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-27 15:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 15:03 [PATCH 1/3] erofs-utils: mkfs: rearrange arguments Gao Xiang
2021-09-27 15:04 ` [PATCH 2/3] erofs-utils: erofs_drop_directly_bhops for blob remapping Gao Xiang
2021-09-27 15:04 ` [PATCH 3/3] erofs-utils: manpage: fix style 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 NNTP newsgroup(s).