bcachefs: intercept mountoption value for bool type
authorHongbo Li <lihongbo22@huawei.com>
Fri, 1 Mar 2024 06:38:33 +0000 (14:38 +0800)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 14 Mar 2024 01:22:26 +0000 (21:22 -0400)
commit2a68d611a17b8135ade5f7016144ef34af0a61a4
treebfd1b9ade6e5ef07fa84b839565bad23aae3c264
parent7e23c1746b027ea6075816280a4e463a9399d9da
bcachefs: intercept mountoption value for bool type

For mount option with bool type, the value must be 0 or 1 (See
bch2_opt_parse). But this seems does not well intercepted cause
for other value(like 2...), it returns the unexpect return code
with error message printed.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/errcode.h
fs/bcachefs/opts.c