Re: [PATCH v2 1/2] ovl: add option parsing support for remount

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

 



On Wed, Apr 11, 2018 at 8:59 AM,  <cgxu519@xxxxxxx> wrote:
> 在 2018年4月4日,下午6:44,Amir Goldstein <amir73il@xxxxxxxxx> 写道:
>>
>> On Wed, Apr 4, 2018 at 12:27 PM, Chengguang Xu <cgxu519@xxxxxxx> wrote:
>>> Some overlayfs mount options cannot be changed via remount,
>>> but remount operation does not return proper error even if
>>> we specify different value to unchangeable options.
>>>
>>> This patch add option parsing support for remount so we can
>>> recogonize unchangeable options in remount.
>>>
>>> Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx>
>>> ---
>>>
>>> Changes since v1:
>>> - Add remount option validation to parse_opt()
>>>
>>> fs/overlayfs/super.c | 133 ++++++++++++++++++++++++++++++++++++++++++++++++---
>>> 1 file changed, 127 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
>>> index 7c24619..4112720 100644
>>> --- a/fs/overlayfs/super.c
>>> +++ b/fs/overlayfs/super.c
>>> @@ -425,6 +425,16 @@ static char *ovl_next_opt(char **s)
>>>
>>> static int ovl_parse_redirect_mode(struct ovl_config *config, const char *mode)
>>> {
>>> +
>>> +       if (!mode) {
>>> +               config->redirect_mode = kstrdup(ovl_redirect_mode_def(),
>>> +                                                       GFP_KERNEL);
>>> +               if (!config->redirect_mode)
>>> +                       return -ENOMEM;
>>> +
>>> +               mode = config->redirect_mode;
>>> +       }
>>
>> This makes @mode argument to function redundant.
>
> Maybe moving default initialization before calling parse_opt() is better,
> what do you think?
>

I think it's ok. Most other options are initialized to default before
parse_opt().

Thanks,
Amir.
--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux