public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] VFS autmounter support
Date: 17 Jun 2003 09:08:28 -0700	[thread overview]
Message-ID: <bcneds$or6$1@cesium.transmeta.com> (raw)
In-Reply-To: 6516.1055861757@warthog.warthog

Followup to:  <6516.1055861757@warthog.warthog>
By author:    David Howells <dhowells@redhat.com>
In newsgroup: linux.dev.kernel
>
> 
> Hi Linus, Al,
> 
> The attached patch adds automounting support and mountpount expiry support to
> the VFS.
> 
> This patch involves the adding the following features:
> 
>  (1) A new dentry operation that (a) marks a dentry as being an automount
>      point, and (b) gets called by the VFS to come up with a vfsmount
>      structure which the VFS then stitches into the mount tree fabric at the
>      appropriate place.
> 
>  (2) A new lookup flag that is used by sys_*stat() to prevent automounting of
>      the path endpoint. This means "ls -l" in an automounter directory doesn't
>      cause a mount storm, but will display all the mountpoints in that
>      directory as subdirectories (either the underlying mountpoint dir or the
>      root dir of the mounted fs if the mountpoint has been triggered already).
> 
>  (3) do_kern_mount() is now exported.
> 
>  (4) The vfsmount structure has acquired, amongst other things, a timeout
>      field. If mntput() notices a vfsmount reach a usage count of 1, then the
>      vfsmount expiry time is set and the namespace that contains the vfsmount
>      has its expiration work chitty queued.
> 
>  (5) The namespace structure has acquired a work struct that is used to
>      actually perform vfsmount expiry under process context.
> 

This seems a bit heavyweight; although some VFS support is needed for
a complex filesystem, effectively doing it all in the kernel (#3)
seems a bit... excessive.

At least #2 can be done with existing means using follow_link.

I think using a revalidation pointer like dentries might be a better
way to do #4/#5, although using the existing one in the dentries is
probably better.

#1 isn't really clear to me what you're going for, but it seems to be
to duplicate bookkeeping.

I also don't see how this solves the biggest problems with complex
automounts, which are:

a) how to guarantee that a large mount tree can be safely destroyed;
b) how to detect partial unmounts.

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64

  reply	other threads:[~2003-06-17 15:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-17 14:55 [PATCH] VFS autmounter support David Howells
2003-06-17 16:08 ` H. Peter Anvin [this message]
2003-06-17 18:07   ` David Howells
2003-06-17 18:19     ` H. Peter Anvin
2003-06-18  8:37       ` David Howells
2003-06-18  8:48         ` viro
2003-06-18 17:16         ` H. Peter Anvin
2003-06-19  7:20           ` David Howells
2003-06-19  7:30             ` H. Peter Anvin
2003-06-24 15:23               ` David Howells
2003-06-18  4:55 ` Linus Torvalds
2003-06-18  5:10   ` viro
2003-06-18  7:55     ` David Howells
2003-06-18  8:36       ` viro
2003-06-18 11:01         ` David Howells

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='bcneds$or6$1@cesium.transmeta.com' \
    --to=hpa@zytor.com \
    --cc=linux-kernel@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