From mboxrd@z Thu Jan 1 00:00:00 1970 From: cgxu519@gmx.com (cgxu519) Date: Wed, 12 Sep 2018 22:41:40 +0800 Subject: [PATCH 4/7] staging: erofs: return -EINVAL when specifying fault rate to 0 In-Reply-To: <20180912142531.nccw2a7zoyolrcym@mwanda> References: <20180912051034.3463-1-cgxu519@gmx.com> <20180912051034.3463-5-cgxu519@gmx.com> <20180912091631.xgxx5zj457z7srlo@mwanda> <0bee6199-25b4-a4bc-0655-ceac650e482a@gmx.com> <20180912142531.nccw2a7zoyolrcym@mwanda> Message-ID: <9c0037e8-4a13-4230-66d3-f368f231277b@gmx.com> On 09/12/2018 10:25 PM, Dan Carpenter wrote: > On Wed, Sep 12, 2018@10:05:26PM +0800, cgxu519 wrote: >> On 09/12/2018 05:16 PM, Dan Carpenter wrote: >>> On Wed, Sep 12, 2018@01:10:31PM +0800, Chengguang Xu wrote: >>>> Set fault rate to 0 is useless and confusable, so add check to >>>> avoid it. >>>> >>> I would have assumed setting rate to zero just disabled it. >> I think currently it is useless because we have not implemented >> option parsing in remount yet, maybe it's better adding another >> option 'no_fault_injection' to explicitly disable it. > That's like the AC on my car, where I can't turn the fan from one to > zero, I have to press disable. I don't like the explicit disable, I > wish they would just remove that button. Interesting, It seems same logic everywhere... > > But I also don't think most people will ever use the fault injection > interface so it doesn't really matter. Do whatever seems good to you. More background: The main reason I touch this option is in remount sometimes we need to restore original option setting when we detecting error during option parsing, so after this patch we can easily determine the option is explicitly set or just keep default value. Thanks, Chengguang