Thread (7 messages) 7 messages, 3 authors, 2019-12-17

Re: [PATCH 02/12] fs_parse: fix fs_param_v_optional handling

From: Andrew Price <hidden>
Date: 2019-11-29 15:56:48
Also in: linux-fsdevel

On 29/11/2019 14:43, Miklos Szeredi wrote:
On Fri, Nov 29, 2019 at 12:31 PM Andrew Price [off-list ref] wrote:
quoted
On 28/11/2019 15:59, Miklos Szeredi wrote:
quoted
String options always have parameters, hence the check for optional
parameter will never trigger.

Check for param type being a flag first (flag is the only type that does
not have a parameter) and report "Missing value" if the parameter is
mandatory.

Tested with gfs2's "quota" option, which is currently the only user of
fs_param_v_optional.
It's not clear to me what the bug is here. My tests with the quota
option are giving expected results. Perhaps I missed a case?
fsopen-test-2: fsconfig(3, FSCONFIG_SET_FLAG, "quota", NULL, 0):
Invalid argument
fsopen-test-2: context log: <e gfs2: Bad value for 'quota'>

kernel: 5.4.0-08836-g81b6b96475ac
Ah right, gotcha. My tests were relying on the same codepaths being used 
from the legacy/monolithic parsing code.

Reviewed-by: Andrew Price <redacted>

Andy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help