All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yue Hu <zbestahu@gmail.com>
To: Gao Xiang <hsiangkao@redhat.com>
Cc: Yue Hu <huyue2@yulong.com>,
	zhangwen@yulong.com, linux-erofs@lists.ozlabs.org
Subject: Re: [PATCH v2] AOSP: erofs-utils: fix sub-directory prefix for canned fs_config
Date: Mon, 28 Dec 2020 19:39:00 +0800	[thread overview]
Message-ID: <20201228193900.000051ef.zbestahu@gmail.com> (raw)
In-Reply-To: <20201228113247.GA2944077@xiangao.remote.csb>

On Mon, 28 Dec 2020 19:32:47 +0800
Gao Xiang <hsiangkao@redhat.com> wrote:

> Hi Yue,
> 
> On Mon, Dec 28, 2020 at 07:20:48PM +0800, Yue Hu wrote:
> > On Mon, 28 Dec 2020 18:51:46 +0800
> > Gao Xiang <hsiangkao@redhat.com> wrote:  
> 
> ...
> 
> > > @@ -696,32 +696,43 @@ int erofs_droid_inode_fsconfig(struct
> > > erofs_inode *inode, /* filesystem_config does not preserve file
> > > type bits */ mode_t stat_file_type_mask = st->st_mode & S_IFMT;
> > >  	unsigned int uid = 0, gid = 0, mode = 0;
> > > -	char *fspath;
> > > +	const char *fspath;
> > > +	char *decorated = NULL;
> > >  
> > >  	inode->capabilities = 0;
> > > +	if (!cfg.fs_config_file && !cfg.mount_point)
> > > +		return 0;
> > > +
> > > +	if (!cfg.mount_point ||
> > > +	/* have to drop the mountpoint for rootdir of canned
> > > fsconfig */
> > > +	    (cfg.fs_config_file && erofs_fspath(path)[0] ==
> > > '\0')) {
> > > +		fspath = erofs_fspath(path);
> > > +	} else {
> > > +		if (asprintf(&decorated, "%s/%s",
> > > cfg.mount_point,
> > > +			     erofs_fspath(path)) <= 0)
> > > +			return -ENOMEM;
> > > +		fspath = decorated;
> > > +	}
> > > +
> > >  	if (cfg.fs_config_file)  
> > 
> > Whether we can use the first "cfg.fs_config_file" when loading
> > canned fs-config to reduce/simplify these duplicated calling?  
> 
> Not sure what you mean... If you mean why not using some

Sorry for my typo. I mean duplicated 'check' to cfg.fs_config_file.

> "fs_config_func" as squashfs did, that is I'd like to 1) avoid such
> unneeded indirect function pointers, and 2) no need to introduce such
> function prototype (I don't want to maintain such function pointer
> type) since fs_config and canned_fs_config implement differently (and
> it seems they also behave differently so no need to mix them at all).

Ok.

> 
> Thanks,
> Gao Xiang
> 


  reply	other threads:[~2020-12-28 11:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201226062736.29920-1-hsiangkao.ref@aol.com>
2020-12-26  6:27 ` [PATCH] AOSP: erofs-utils: fix sub-directory prefix for canned fs_config Gao Xiang via Linux-erofs
2020-12-28  7:05   ` Yue Hu
2020-12-28 10:03   ` Huang Jianan
2020-12-28 10:48     ` Gao Xiang
2020-12-28 10:51   ` [PATCH v2] " Gao Xiang
2020-12-28 11:14     ` Huang Jianan
2020-12-28 11:20     ` Yue Hu
2020-12-28 11:32       ` Gao Xiang
2020-12-28 11:39         ` Yue Hu [this message]
2020-12-28 11:46     ` Yue Hu
2020-12-28 12:43       ` Gao Xiang
2020-12-31 16:31     ` Li GuiFu via Linux-erofs
2020-12-31 16:50       ` Gao Xiang
2020-12-31 16:46     ` 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20201228193900.000051ef.zbestahu@gmail.com \
    --to=zbestahu@gmail.com \
    --cc=hsiangkao@redhat.com \
    --cc=huyue2@yulong.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=zhangwen@yulong.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.