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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29/11/2019 14:43, Miklos Szeredi wrote:
On Fri, Nov 29, 2019 at 12:31 PM Andrew Price <anprice@xxxxxxxxxx> wrote:

On 28/11/2019 15:59, Miklos Szeredi wrote:
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 <anprice@xxxxxxxxxx>

Andy




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux