From: "Lukáš Czerner" <lczerner@redhat.com>
To: Karel Zak <kzak@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
Al Viro <viro@ZenIV.linux.org.uk>,
Dexuan Cui <decui@microsoft.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"'linux-ext4'" <linux-ext4@vger.kernel.org>
Subject: Re: Can one file system be R/W mounted multiple times in Linux?
Date: Mon, 12 Jan 2015 15:20:19 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.00.1501121514550.32312@localhost.localdomain> (raw)
In-Reply-To: <20150112130058.GM20899@x2.net.home>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1493 bytes --]
On Mon, 12 Jan 2015, Karel Zak wrote:
> Date: Mon, 12 Jan 2015 14:00:58 +0100
> From: Karel Zak <kzak@redhat.com>
> To: Lukáš Czerner <lczerner@redhat.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>, Al Viro <viro@ZenIV.linux.org.uk>,
> Dexuan Cui <decui@microsoft.com>,
> "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
> 'linux-ext4' <linux-ext4@vger.kernel.org>
> Subject: Re: Can one file system be R/W mounted multiple times in Linux?
>
> On Fri, Jan 09, 2015 at 04:52:11PM +0100, Lukáš Czerner wrote:
> > Now the question is, whether 'mount' can be a bit smarter than that
> > and just mount the already existing block device instead of creating
> > new one ? Karel ?
>
> Well, the question is how smart is too smart :-) And Al is right, problem
> is in races.
>
> Anyway, I'd like to avoid complex FS specific code in mount(8). IMHO
> it's FS driver responsibility to avoid (or support) FS sharing between
> more block devices.
>
> BTW, for ext4 you can enable ETX4_FEATURE_INCOMPAT_MMP to protect
> against multi-mount.
>
> Karel
Hi Karel,
that's not what I meant at all. Yes, things like MMP should help.
But what I was suggesting was not FS specific.
mount(8) could in case of '-o loop' look whether there is already a
block device associated with the file and if so use it instead of
creating new one.
However this might race with device removal among other things and I
am not sure whether there is any easy solution.
Thanks!
-Lukas
next prev parent reply other threads:[~2015-01-12 14:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-09 3:44 Can one file system be R/W mounted multiple times in Linux? Dexuan Cui
2015-01-09 3:51 ` Al Viro
2015-01-09 4:58 ` Dexuan Cui
2015-01-09 6:04 ` Eric Sandeen
2015-01-09 6:48 ` Dexuan Cui
2015-01-09 13:25 ` Bob Peterson
2015-01-09 12:01 ` Stefan Hajnoczi
2015-01-09 14:55 ` Christoph Hellwig
2015-01-09 15:52 ` Lukáš Czerner
2015-01-09 19:31 ` Pranay Srivastava
2015-01-09 20:37 ` Al Viro
2015-01-10 3:52 ` Dexuan Cui
2015-01-12 13:00 ` Karel Zak
2015-01-12 14:20 ` Lukáš Czerner [this message]
2015-01-12 16:47 ` Karel Zak
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=alpine.LFD.2.00.1501121514550.32312@localhost.localdomain \
--to=lczerner@redhat.com \
--cc=decui@microsoft.com \
--cc=kzak@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=stefanha@redhat.com \
--cc=viro@ZenIV.linux.org.uk \
/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