All of lore.kernel.org
 help / color / mirror / Atom feed
From: Seunghun Lee <waydi1@gmail.com>
To: hujianyang <hujianyang@huawei.com>
Cc: miklos@szeredi.hu, sedat.dilek@gmail.com,
	richard.weinberger@gmail.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-unionfs@vger.kernel.org
Subject: Re: [PATCH] ovl: Prevent rw remount when it should be ro mount
Date: Thu, 08 Jan 2015 00:04:59 +0900	[thread overview]
Message-ID: <54AD4B1B.1030801@gmail.com> (raw)
In-Reply-To: <54ACA052.8010800@huawei.com>

Hi Hu,

On 01/07/2015 11:56 AM, hujianyang wrote:
> Hi,
>
> There maybe some misunderstandings here. I think your patch really
> fix an important problem, but not in correct way.
>
> On 2015/1/6 22:02, Seunghun Lee wrote:
>> After patch:
>> root@qemux86:~# mount -t overlay overlay -olowerdir=lower:lower2 merged
>> mount: warning: merged seems to be mounted read-only.
>> root@qemux86:~# mount | grep overlay
>> overlay on /home/root/merged type overlay (ro,relatime,lowerdir=lower:lower2)
>> root@qemux86:~# mount -o remount,rw merged
>> mount: warning: /home/root/merged seems to be mounted read-only.
>> root@qemux86:~# mount | grep overlay
>> overlay on /home/root/merged type overlay (ro,relatime,lowerdir=lower:lower2)
>> root@qemux86:~# echo hi > merged/hi
>> -sh: merged/hi: Read-only file system
>> root@qemux86:~#
>>
> If users want a rw mount, can we give them a ro mount? I think it's
> wrong, .remount_fs should refuse this request.
>
> So I think your .remount_fs should check both what users in userpace
> want and what kernel can offer, then realize legal requests and
> refuse illegal requests. Not changing the requests from users.
Many file systems just change flags when user requests read-write remount.
(romfs, squashfs, sysv...)
I thought this case is similar above filesystems.
> Further more, can we replace upper/lower/work directories or mount
> point by this .remount_fs?
>
> If you want to export a new function, I think you should considering
> more about these.
>
> Thanks,
> Hu
>
Yes, you are right. However, this patch is a minimal support to
prevent kernel panic when file system is remounted to read-write mode.
And many file systems have remount_fs function of this kind.

I think what you mentioned is can be added later if it is necessary.

Thanks.

  reply	other threads:[~2015-01-07 15:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-02 17:26 [PATCH] ovl: Prevent rw remount when it should be ro mount Seunghun Lee
2015-01-04  2:59 ` hujianyang
2015-01-04  2:59   ` hujianyang
2015-01-06 14:02   ` Seunghun Lee
2015-01-07  2:56     ` hujianyang
2015-01-07  2:56       ` hujianyang
2015-01-07 15:04       ` Seunghun Lee [this message]
2015-01-08 13:50         ` Miklos Szeredi
  -- strict thread matches above, loose matches on Subject: below --
2015-01-01 15:38 Seunghun Lee
2015-01-01 18:33 ` Sedat Dilek
2015-01-02 17:23   ` Seunghun Lee
2015-01-01  5:07 Seunghun Lee
2015-01-01 15:13 ` Richard Weinberger
2015-01-01 15:24   ` Sedat Dilek
2015-01-01 15:30     ` Seunghun Lee

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=54AD4B1B.1030801@gmail.com \
    --to=waydi1@gmail.com \
    --cc=hujianyang@huawei.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=richard.weinberger@gmail.com \
    --cc=sedat.dilek@gmail.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 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.