linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: cgxu519 <cgxu519@gmx.com>, jaegeuk@kernel.org, yuchao0@huawei.com
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: remove default option setting in remount
Date: Wed, 19 Sep 2018 22:02:45 +0800	[thread overview]
Message-ID: <13e22905-22e6-2048-c6b7-5f573380f189@kernel.org> (raw)
In-Reply-To: <a8cdaf63-c5fd-9391-2411-b61c8941351e@gmx.com>

On 2018/9/18 21:47, cgxu519 wrote:
> On 09/18/2018 09:20 PM, Chao Yu wrote:
>> On 2018/9/18 14:23, Chengguang Xu wrote:
>>> Currently we set default value to options before parsing remount options,
>>> it will cause unexpected change of options which were specified in first
>>> mount.
>> Can you check below commit? It looks w/o it we may lose default option after
>> remount.
>>
>> 498c5e9fcd10 ("f2fs: add default mount options to remount")
> 
> Hi Chao,

Hi Chengguang,

> 
> It looks like there was a bug in remount at that time, but I think the fix above
> is not correct.
> 
> from the patch '498c5e9fcd10', I think it was caused by clearing
> sbi->mount_opt.opt before
> 
> parsing. I think remount should not change the options which were specified by
> user in
> 
> previous mount unless user specifies in remount.

Can you check description in manual of mount.

IIRC, old mount option will be record into /etc/mtab or /proc/mounts (for
adapting namespace feature), with command of "mount -o remount,rw  /dir", old
mount options can be loaded from above config file, and merge them with new
specified options.

Even we kill old mount options by call default_options() in ->remount, user's
old mount option can still be set through parameters.

But the problem here is, some old parameter can be configured via sysfs, if we
reset them in default_options(), we will lose them forever after remount.

If you have no other opinion about this, could you adapt your commit log?

Thanks,

> 
> Thanks,
> Chengguang
> 
> 
> 
> 
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2018-09-19 14:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18  6:23 [PATCH] f2fs: remove default option setting in remount Chengguang Xu
2018-09-18 13:20 ` Chao Yu
2018-09-18 13:47   ` cgxu519
2018-09-19 14:02     ` Chao Yu [this message]
2018-09-19 23:54       ` cgxu519
2018-09-20  6:29         ` Chao Yu
2018-09-22 14:40           ` cgxu519
2018-09-25  7:41             ` Chao Yu
2018-10-18  5:28               ` Chengguang Xu
2018-10-19  2:15                 ` Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13e22905-22e6-2048-c6b7-5f573380f189@kernel.org \
    --to=chao@kernel.org \
    --cc=cgxu519@gmx.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=yuchao0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).