All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	akpm@linux-foundation.org, torvalds@linux-foundation.org
Subject: Re: [RFC PATCH] file as directory
Date: Tue, 22 May 2007 23:10:46 +0100	[thread overview]
Message-ID: <20070522221045.GH4095@ftp.linux.org.uk> (raw)
In-Reply-To: <E1HqZPd-0008Dh-00@dorka.pomaz.szeredi.hu>

On Tue, May 22, 2007 at 08:48:49PM +0200, Miklos Szeredi wrote:
> Why do we want this?
> --------------------
> 
> That depends on who you ask.  My answer is this:
> 
>   'foo.tar.gz/foo/bar' or
>   'foo.tar.gz/contents/foo/bar'
> 
> or something similar.
> 
> Others might suggest accessing streams, resource forks or extended
> attributes through such an interface.  However this patch only deals
> with the non-directory case, so directories would be excluded from
> that interface.
> 
> But otherwise this patch doesn't limit the uses of the "file as
> directory" concept in any way.  It just adds the infrastructure to
> support these whacky beasts.
> 
> How is it done?
> ---------------
> 
> (See this [1] thread for more discussion on the subject)
> 
> When a non-directory object is accessed without a trailing slash, then
> path resolution returns the object itself as usual.
> 
> If a non-directory object is accessed with a trailing slash, then the
> filesystem may opt to let the file be accessed as a directory.  In
> this case "something" (as supplied by the filesystem) is mounted on
> top of the non-directory object.
> 
> This mount will have special properties:
> 
>  - If there's no trailing slash is after the file name, the mount
>    won't be followed, even if the path resolution would otherwise
>    follow mounts.
> 
>  - The mount only stays there while it is referenced by some external
>    object, like a pwd or an open file.  When it is no longer
>    referenced, it is automatically unmounted.
> 
>  - Unlike "real" mounts, this won't block unlink(2) or rename(2) on
>    the underlying object.

Interesting...  How do you deal with mount propagation and things like
mount --move?  As for unlink...  How do you deal with having that thing
mounted, mounting something _under_ it (so that vfsmount would be kept
busy) and then unlinking that sucker?

I'll look through the patch tonight; it sounds interesting, assuming that
we don't run into serious crap with locking and <shudder> revalidation
logics.

  reply	other threads:[~2007-05-22 22:10 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 18:48 [RFC PATCH] file as directory Miklos Szeredi
2007-05-22 22:10 ` Al Viro [this message]
2007-05-23  6:36   ` Miklos Szeredi
2007-05-23  7:03     ` Al Viro
2007-05-23  7:19       ` Miklos Szeredi
2007-05-23  7:36         ` Al Viro
2007-05-23  8:05           ` Miklos Szeredi
2007-05-23  8:29             ` Al Viro
2007-05-23  9:03               ` Miklos Szeredi
2007-05-23  9:58                 ` Al Viro
2007-05-23 10:14                   ` Miklos Szeredi
2007-05-23  9:16             ` Jan Blunck
2007-05-23  9:28               ` Miklos Szeredi
2007-05-23 12:34           ` Trond Myklebust
2007-05-23 12:40             ` Al Viro
2007-05-23  9:21     ` Jan Blunck
2007-05-23  9:35       ` Miklos Szeredi
2007-05-24 12:07     ` Pavel Machek
2007-05-28 14:43       ` Miklos Szeredi
2007-05-22 23:26 ` Shaya Potter
2007-05-23  6:39   ` Miklos Szeredi
2007-05-23  9:51 ` Al Viro
2007-05-23 10:09   ` Miklos Szeredi
2007-05-23 10:24     ` Miklos Szeredi
2007-05-23 10:24     ` Al Viro
2007-05-23 10:40       ` Miklos Szeredi
2007-05-23 11:39         ` Al Viro
2007-05-23 12:16           ` Al Viro
2007-05-23 13:01             ` Miklos Szeredi
2007-05-23 13:51               ` Al Viro
2007-05-23 14:32                 ` Miklos Szeredi
2007-05-23 15:06                   ` Al Viro
2007-05-23 15:25                     ` Miklos Szeredi
2007-05-23 15:37                       ` Al Viro
2007-05-23 15:55                         ` Miklos Szeredi
2007-05-23 13:23           ` Ph. Marek
2007-05-23 13:54             ` Al Viro
2007-05-23 12:01 ` Jan Engelhardt
2007-05-23 13:20 ` Jaroslav Sykora

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=20070522221045.GH4095@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.