linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Anatol Pomozov <anatol.pomozov@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: How to unmount mounts corresponding to super_block structure?
Date: Wed, 27 Feb 2013 07:43:44 +0000	[thread overview]
Message-ID: <20130227074344.GO4503@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CAOMFOmX5Mr0Mm9OgO-PCnaT2JA6cdMSQwJT6fP3vGnAhpVtmVQ@mail.gmail.com>

On Tue, Feb 26, 2013 at 11:19:30PM -0800, Anatol Pomozov wrote:
> Hi
> 
> On Tue, Feb 26, 2013 at 10:56 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> > Simple: don't.  This is fundamentally wrong thing to do.  Not to mention
> > anything else, there may be more than one namespace out there.  This
> > operation makes no sense.
> 
> Yes I understand that there can be multiple namespaces. And I am fine
> with unmounting only in the current namespace. It is actually how
> libfuse currently implemented - it calls umount() on the mount point
> path, so it leaves 1) bind mounts 2) mounts in other namespaces
> untouched.
>
> Another ugly-but-working solution for fuse would be pass mountpoint
> path as a mount option and store it to super_block. Then in
> fuse_dev_release() call sys_umount().

Observe mount --move...  There is no promise that it'll stay mounted where
it used to be.  BTW, what about somebody having cloned the entire namespace?
Or spread the sucker via shared subtree stuff to another namespace, later
remounted private, etc.

"All places where the filesystem is mounted" is about as good a notion as
"all pathnames of a file".  Sorry.

	Besides, I _really_ doubt that it's a sane idea to start with; consider
something like mount --bind empty_directory <something I really want overmounted
and not accessible>.  Having it suddenly exposed without your explicit action
is not a good thing.  As the matter of fact, something very similar had been
outright NAKed by Linus and I agree with his arguments...

      reply	other threads:[~2013-02-27  7:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-27  6:35 How to unmount mounts corresponding to super_block structure? Anatol Pomozov
2013-02-27  6:56 ` Al Viro
2013-02-27  7:19   ` Anatol Pomozov
2013-02-27  7:43     ` Al Viro [this message]

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=20130227074344.GO4503@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=anatol.pomozov@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /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).