[PATCH RESEND] erofs: convert to use the new mount fs_context api

Al Viro viro at zeniv.linux.org.uk
Sun Dec 29 08:21:56 AEDT 2019


On Fri, Dec 27, 2019 at 11:50:16AM +0800, Gao Xiang wrote:
> Hi Al,
> 
> Greeting, we plan to convert erofs to new mount api for 5.6
> 
> and I just notice your branch
> https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/log/?h=untested.fs_parse
> 
> do a lot further work on fs context (e.g. "get rid of ->enums",
> "remove fs_parameter_description name field" and switch to
> use XXXfc() instead of XXXf() with prefixed string).
> 
> Does it plan for 5.6 as well? If yes, we will update this patch
> based on the latest branch and maybe have chance to go though
> your tree if it can?

FWIW, I would add the following to what you've already mentioned:

> > +static const struct fs_parameter_spec erofs_param_specs[] = {
> > +	fsparam_flag("user_xattr",	Opt_user_xattr),
> > +	fsparam_flag("nouser_xattr",	Opt_nouser_xattr),
> > +	fsparam_flag("acl",		Opt_acl),
> > +	fsparam_flag("noacl",		Opt_noacl),
better off as
	fsparam_flag_no("user_xattr",	Opt_user_xattr),
	fsparam_flag_no("acl",		Opt_acl),

> > +	case Opt_user_xattr:
		if (result.boolean)
			set_opt(sbi, XATTR_USER);
		else
			clear_opt(sbi, XATTR_USER);
> > +		break;
....
> > +	default:
		return -ENOPARAM;

BTW, what's the point of using invalf() in contexts where
the return value is ignored?  Why not simply go for errorf()
(or errorfc(), for that matter)?

I do plan that branch (or an equivalent, as far as filesystems
are concerned - there might be a bit of additional rework in
the beginning + currently missing modifications of docs) for
5.6.  So updated patch would be welcome - I can do that myself,
but if you can rebase it on top of that branch it would save
time.


More information about the Linux-erofs mailing list