* [PATCH v2] erofs: surround fault_injection ralted option parsing using CONFIG_EROFS_FAULT_INJECTION
@ 2018-09-10 23:51 Chengguang Xu
2018-09-11 16:50 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Chengguang Xu @ 2018-09-10 23:51 UTC (permalink / raw)
It's a little bit strange when fault_injection related
option fail with -EINVAL which was already disabled
from config, so surround all fault_injection related option
parsing code using CONFIG_EROFS_FAULT_INJECTION. Meanwhile,
slightly change warning message to keep consistency with
option POSIX_ACL and FS_XATTR.
Signed-off-by: Chengguang Xu <cgxu519 at gmx.com>
---
v1->v2:
- modify warning message.
drivers/staging/erofs/super.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c
index 1aec509c805f..4ad55dcb8e68 100644
--- a/drivers/staging/erofs/super.c
+++ b/drivers/staging/erofs/super.c
@@ -237,16 +237,18 @@ static int parse_options(struct super_block *sb, char *options)
infoln("noacl options not supported");
break;
#endif
+#ifdef CONFIG_EROFS_FAULT_INJECTION
case Opt_fault_injection:
if (args->from && match_int(args, &arg))
return -EINVAL;
-#ifdef CONFIG_EROFS_FAULT_INJECTION
erofs_build_fault_attr(EROFS_SB(sb), arg);
set_opt(EROFS_SB(sb), FAULT_INJECTION);
+ break;
#else
- infoln("FAULT_INJECTION was not selected");
-#endif
+ case Opt_fault_injection:
+ infoln("fault_injection options not supported");
break;
+#endif
default:
errln("Unrecognized mount option \"%s\" "
"or missing value", p);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v2] erofs: surround fault_injection ralted option parsing using CONFIG_EROFS_FAULT_INJECTION
2018-09-10 23:51 [PATCH v2] erofs: surround fault_injection ralted option parsing using CONFIG_EROFS_FAULT_INJECTION Chengguang Xu
@ 2018-09-11 16:50 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2018-09-11 16:50 UTC (permalink / raw)
On 2018/9/11 7:51, Chengguang Xu wrote:
> It's a little bit strange when fault_injection related
> option fail with -EINVAL which was already disabled
> from config, so surround all fault_injection related option
> parsing code using CONFIG_EROFS_FAULT_INJECTION. Meanwhile,
> slightly change warning message to keep consistency with
> option POSIX_ACL and FS_XATTR.
>
> Signed-off-by: Chengguang Xu <cgxu519 at gmx.com>
Prefix of patch title should be "staging: erofs: " as Xiang pointed out,
otherwise it looks good to me, you can add:
Reviewed-by: Chao Yu <yuchao0 at huawei.com>
Thanks,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-11 16:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-10 23:51 [PATCH v2] erofs: surround fault_injection ralted option parsing using CONFIG_EROFS_FAULT_INJECTION Chengguang Xu
2018-09-11 16:50 ` Chao Yu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.