Re: [PATCH] vfs: Don't reject unknown parameters

From: Al Viro
Date: Tue Dec 17 2019 - 12:46:58 EST


On Fri, Dec 13, 2019 at 10:15:03AM +0100, Miklos Szeredi wrote:

> Just need a flag in fc indicating if this option comes from the old interface:
>
> if (strcmp(param->key, "source") == 0)
> return -ENOPARAM;
> /* Just log an error for backwards compatibility */
> errorf(fc, "%s: Unknown parameter '%s'", fc->fs_type->name,
> param->key);
> return fc->legacy ? 0 : -ENOPARAM;

What the hell for? Just have a separate ->parse_param() instance
for "promiscuous fs, will accept bullshit options" and have such filesystems
use it explicitly. With default being not that, but rejecting unknowns.