[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F792CF86EFE20D4AB8064279AFBA51C61EA73ACF@SIXPRD3002MB028.064d.mgd.msft.net>
Date: Sat, 10 Jan 2015 03:52:35 +0000
From: Dexuan Cui <decui@...rosoft.com>
To: Al Viro <viro@...IV.linux.org.uk>,
Pranay Srivastava <pranjas@...il.com>
CC: Lukáš Czerner <lczerner@...hat.com>,
Stefan Hajnoczi <stefanha@...hat.com>,
"kzak@...hat.com" <kzak@...hat.com>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
linux-ext4 <linux-ext4@...r.kernel.org>
Subject: RE: Can one file system be R/W mounted multiple times in Linux?
> -----Original Message-----
> From: Al Viro [mailto:viro@....linux.org.uk] On Behalf Of Al Viro
> Sent: Saturday, January 10, 2015 4:37 AM
> To: Pranay Srivastava
> Cc: Lukáš Czerner; Stefan Hajnoczi; kzak@...hat.com; Dexuan Cui; linux-
> fsdevel@...r.kernel.org; linux-ext4
> Subject: Re: Can one file system be R/W mounted multiple times in Linux?
>
> 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...
Thank you all for the pretty informative discussion!
I think now I know when it's safe and when it's unsafe... :-)
Thanks,
-- Dexuan
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists