linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@redhat.com>
To: Huang Jianan <huangjianan@oppo.com>
Cc: zhangshiming@oppo.com, huyue2@yulong.com,
	linux-erofs@lists.ozlabs.org, guoweichao@oppo.com
Subject: Re: [PATCH] AOSP: erofs-utils: fix sub-directory prefix for canned fs_config
Date: Mon, 28 Dec 2020 18:48:30 +0800	[thread overview]
Message-ID: <20201228104830.GA2938609@xiangao.remote.csb> (raw)
In-Reply-To: <94a271f5-2bfd-002e-a77a-93582282a6d0@oppo.com>

On Mon, Dec 28, 2020 at 06:03:26PM +0800, Huang Jianan wrote:
> 
> 在 2020/12/26 14:27, Gao Xiang 写道:

...

> > +	if (!cfg.mount_point ||
> > +	/* have to drop the mountpoint for rootdir of canned fsconfig */
> > +	    (cfg.fs_config_file && IS_ROOT(inode))) {
> 
> Hi Xiang,
> 
> I have tested this patch with --fs-config-file, and the problem still
> exists.
> 
> IS_ROOT can't be used here to determine the root directory , because
> inode->i_parent is null at this time. It will be set after this function.
> 

Hi Jianan,

Thanks for your report! Sorry for the troublesome.
I need to turn back as the next version.... Very sorry about this!

Thanks,
Gao Xiang

> Thanks,
> 
> Jianan
> 
> > +		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)
> > -		canned_fs_config(erofs_fspath(path),
> > +		canned_fs_config(fspath,
> >   				 S_ISDIR(st->st_mode),
> >   				 cfg.target_out_path,
> >   				 &uid, &gid, &mode, &inode->capabilities);
> > -	else if (cfg.mount_point) {
> > -		if (asprintf(&fspath, "%s/%s", cfg.mount_point,
> > -			     erofs_fspath(path)) <= 0)
> > -			return -ENOMEM;
> > -
> > +	else
> >   		fs_config(fspath, S_ISDIR(st->st_mode),
> >   			  cfg.target_out_path,
> >   			  &uid, &gid, &mode, &inode->capabilities);
> > -		free(fspath);
> > -	}
> > -	st->st_uid = uid;
> > -	st->st_gid = gid;
> > -	st->st_mode = mode | stat_file_type_mask;
> >   	erofs_dbg("/%s -> mode = 0x%x, uid = 0x%x, gid = 0x%x, "
> >   		  "capabilities = 0x%" PRIx64 "\n",
> > -		  erofs_fspath(path),
> > -		  mode, uid, gid, inode->capabilities);
> > +		  fspath, mode, uid, gid, inode->capabilities);
> > +
> > +	if (decorated)
> > +		free(decorated);
> > +	st->st_uid = uid;
> > +	st->st_gid = gid;
> > +	st->st_mode = mode | stat_file_type_mask;
> >   	return 0;
> >   }
> >   #else
> 


  reply	other threads:[~2020-12-28 10:48 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 [this message]
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
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=20201228104830.GA2938609@xiangao.remote.csb \
    --to=hsiangkao@redhat.com \
    --cc=guoweichao@oppo.com \
    --cc=huangjianan@oppo.com \
    --cc=huyue2@yulong.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=zhangshiming@oppo.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 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).