archive mirror
 help / color / mirror / Atom feed
From: Gao Xiang <>
To: Hu Weiwen <>
Subject: Re: [PATCH v2] erofs-utils: add cmd argument to override uid/gid
Date: Thu, 1 Apr 2021 20:01:03 +0800	[thread overview]
Message-ID: <20210401120102.GA30040@hsiangkao-HP-ZHAN-66-Pro-G1> (raw)
In-Reply-To: <>

On Thu, Apr 01, 2021 at 07:36:10PM +0800, Hu Weiwen wrote:
> Also added '--all-root' option to set uid and gid to root conveniently.
> This function can be useful if we want to pack some data owned by user with
> large uid, but we want to use compact inode.
> This interface mimics that of 'mksquashfs'.
> Signed-off-by: Hu Weiwen <>

Yey! I've applied with the following modification,

diff --git a/include/erofs/config.h b/include/erofs/config.h
index e6eaef66b91c..15390f4ca9c8 100644
--- a/include/erofs/config.h
+++ b/include/erofs/config.h
@@ -54,8 +54,7 @@ struct erofs_configure {
 	/* < 0, xattr disabled and INT_MAX, always use inline xattrs */
 	int c_inline_xattr_tolerance;
 	u64 c_unix_timestamp;
-	u32 c_uid;
-	u32 c_gid;
+	u32 c_uid, c_gid;
 	char *mount_point;
 	char *target_out_path;
diff --git a/mkfs/main.c b/mkfs/main.c
index 72b7f17e1c66..d8823b539194 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -77,8 +77,8 @@ static void usage(void)
 	      " --file-contexts=X  specify a file contexts file to setup selinux labels\n"
-	      " --force-uid=UID    set all file uids to UID\n"
-	      " --force-gid=GID    set all file gids to GID\n"
+	      " --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"

Otherwise looks good to me,
Reviewed-by: Gao Xiang <>

Gao Xiang

  reply	other threads:[~2021-04-01 12:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  5:29 [PATCH] erofs-utils: add command line argument to override uid/gid Hu Weiwen
2021-04-01  6:01 ` Gao Xiang
2021-04-01 11:36   ` [PATCH v2] erofs-utils: add cmd " Hu Weiwen
2021-04-01 12:01     ` Gao Xiang [this message]
2021-04-11 13:50       ` Li GuiFu via Linux-erofs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210401120102.GA30040@hsiangkao-HP-ZHAN-66-Pro-G1 \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).