linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Pranay Srivastava <pranjas@gmail.com>
Cc: "Lukáš Czerner" <lczerner@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	kzak@redhat.com, "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: Fri, 9 Jan 2015 20:37:11 +0000	[thread overview]
Message-ID: <20150109203711.GJ22149@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CA+aCy1Esm-2NGvJFG4_22rNaXiOqx1f2beCPpSCcovrXFf07+A@mail.gmail.com>

On Sat, Jan 10, 2015 at 01:01:19AM +0530, Pranay Srivastava wrote:

> It's not the mount. If you see mount_bdev it checks for this and uses
> the existing super block from the first mount
> for all subsequent mounts of that block device.
> 
> When block devices differ, as in with 2 loop devices they have
> different bdev and that's why it doesn't work with 2
> loop devices.

What Lukas is suggesting is for mount(8) to spot an existing loop device with
the desired backing store and reuse it, rather than try and set the new one
up.  That's where -o loop is handled - it's gone before mount(2) might see
it.  The problem is in races...

  reply	other threads:[~2015-01-09 20:37 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 [this message]
2015-01-10  3:52           ` Dexuan Cui
2015-01-12 13:00       ` Karel Zak
2015-01-12 14:20         ` Lukáš Czerner
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=20150109203711.GJ22149@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=decui@microsoft.com \
    --cc=kzak@redhat.com \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=pranjas@gmail.com \
    --cc=stefanha@redhat.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).