public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Masover <ninja@slaphack.com>
To: Peter Foldiak <Peter.Foldiak@st-andrews.ac.uk>
Cc: Hans Reiser <reiser@namesys.com>,
	reiserfs-list@namesys.com, linux-kernel@vger.kernel.org
Subject: Re: file as a directory
Date: Tue, 14 Dec 2004 22:47:01 -0600	[thread overview]
Message-ID: <41BFC1C5.1070302@slaphack.com> (raw)
In-Reply-To: <1103059622.2999.17.camel@grape.st-and.ac.uk>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter Foldiak wrote:
| On Tue, 2004-12-14 at 17:24, Hans Reiser wrote:
|
|>Peter, I think you are right, though it might be useful to have the
|>default be dirname/..../glued and to allow users to link
|>dirname/..../filebody to
|>dirname/..../something_else_if_they_want_it_to_not_be_glued, and to have
|>dirname/..../filebody or whatever it is linked to be what they get if
|>they read the directory as a file.
|
|
| Yes. I assume you mean that dirname in itself should always be
| interpreted as dirname/..../glued, which by default would be a linked to
| dirname/..../filebody, the latter being the file content, right?

I think he means the other way.
	cat foo
is the same as
	cat foo/.../filebody
where "filebody" is some sort of link to (maybe) foo/.../glued.

Understand that you want to allow "normal" files which are not "glued"
anything, but also "glued" files which are composed of sub-files.

| Also, a pseudofile (e.g. dirname/..../structure ?) could be used to
| specify how the files should be glued together. A simple question is,
| for instance, what separators to use between the components, and what
| ordering to use when putting the component objects together. (This
| pseudofile could also determine more complicated ways of composing
| objects.)

If the filesystem does caching, I'd rather have a type of executable
which, read normally, appears as a stream of its own standard output.
You'd get the actual file as something like bar/.../source.

This could be done with pipes and daemons, but it's not as easy to
manage and seems impossible to do as efficiently (with built-in caching,
etc.)

| The component objects themselves could be full objects, so they
| themselves could have sub-components.

Right.

Also, there should be an inverse. For instance, a file-as-directory type
object should have a "contents" object, usually a normal directory, but
which could conceivably be any type of object, including a code-ish
object which implements a filesystem. Accessing foo/ would be the same
as accessing foo/.../contents, only because "..." (or whatever we use
for meta-files) is outside the actual directory namespace,
foo/.../contents/... refers to the metas of object "contents", which are
different than the metas of object "foo".

These two steps essentially create userspace "plugins", and do away with
having to mount other kernel layers such as lufs (or whatever its
current implementation is). It does have one important implication, though:

It's important that "metas" or "..." or whatever we've decided on should
_not_ be mutable by a "userspace" plugin that I have described, nor
should any meta-files created by kernel plugins. There would be other
security implications, of course -- user should still not be able to
create files that are owned by other users and setuid. I'm not sure
where such checks should go, but we want mortal users to be able to add
whatever plugins they want, while super-users can feel safe using the
metas interface to manipulate user files.

I think the issues with directory-as-a-file were the same problems you
get when you allow hardlinked directories -- that you'd eventually have
to ditch reference counting for a garbage collector, which is hellishly
impractical. I don't have a solution to that, other than dropping
hardlinks entirely.

Hmm. Why do we need hardlinks? I forget.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQIVAwUBQb/BxHgHNmZLgCUhAQJ4tA//ZVHoODSgxrIKgk2RtxGW4X8piQc0cGVq
KLwQmbCg/LRRld1VhPDikROMjZWrubzzsY5NujEmZFjdnA/m3mgO5DVsd6xtiGDJ
5B47aDTyygRWA6SONw6q+47me2lqFSBvZYOM9E468CNNKEExMys9R+sY82b1lbRi
iAesW49tWusZtonI66D1aK3a6ue9MEBjbZkGi+qR1DYK02+gc2SVbeDc7dbx4GrC
0GBfO92O+0OJKnYn3/e7wag57/cJYEOrDW2Dg9mOD2UOK+6fmJLf8lx6XIxI+QOp
YLp9dY4scac5PlC+z6DUPuv8rRGu7GUDJdffzNoG18MYQChZcE6e1lVWPpunMiqh
quWWr6wi09m5eoUq27w8fHS0UeJ/fn1+Ckr+4+zEZv3CluK0KMqPDYOcKfR5Hs/3
MYzrbVXFoaOZd59oMzBlikJoMbTikm0UNSQhaKlw3ZFH46V/lKrCzOjh3ZNQ3rqx
t0f0BrVgGKluX5cw5srzxOBjnOxw3OMtsuAlElHunNALeRn8xMFcc7tuVwVn0Wxv
hx48IUk3KwTrAomN0SS4m+a9MLUjtxXMkr/1hViJ8ofRRqXMFghXq/WTeIA4BLxM
9SnfZqHcldF3NKZq1bCQlv8nJFOPxwQE0Zt9gtFSBq6rndfexdO2XZtyH7pxm4FX
X/NK4MR5iSk=
=3BWI
-----END PGP SIGNATURE-----

  reply	other threads:[~2004-12-15  4:47 UTC|newest]

Thread overview: 107+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-22 13:54 file as a directory Amit Gud
2004-11-22 14:37 ` Martin Waitz
2004-11-22 15:34   ` Zan Lynx
2004-11-22 17:18     ` Martin Waitz
2004-11-22 18:16   ` Jan Engelhardt
2004-11-22 14:38 ` Al Viro
2004-11-22 15:04 ` Helge Hafting
2004-11-22 17:15   ` Tomas Carnecky
2004-11-22 18:48     ` Hans Reiser
2004-11-24  9:16       ` Peter Foldiak
2004-11-24 14:05         ` Jan Engelhardt
2004-11-24 15:02         ` Paolo Ciarrocchi
2004-11-24 15:25           ` Peter Foldiak
2004-11-26 16:13             ` Hans Reiser
2004-11-24 16:11           ` Christian Mayrhuber
2004-11-25 10:50             ` Peter Foldiak
2004-11-26 18:19               ` Hans Reiser
2004-11-26 21:13                 ` Christian Mayrhuber
2004-11-27 11:09                   ` Peter Foldiak
2004-11-27 13:14                     ` Christian Mayrhuber
2004-11-29 21:20                       ` Horst von Brand
2004-11-29 22:59                         ` Peter Foldiak
2004-11-29 23:35                           ` Kevin Fox
2004-11-30  8:54                             ` Peter Foldiak
2004-11-30 16:28                               ` Kevin Fox
2004-11-30 16:42                                 ` Jan Engelhardt
2004-11-30 17:35                                   ` Jesse Pollard
2004-11-30 17:49                                     ` Jan Engelhardt
2004-11-30 18:26                                       ` Amit Gud
2004-11-30 18:39                                         ` Jan Engelhardt
2004-12-01  2:44                                           ` Scott Young
2004-12-03  9:58                                           ` Amit Gud
2004-11-30 14:51                           ` Horst von Brand
2004-11-30 15:29                             ` Peter Foldiak
2004-11-30 16:31                               ` Horst von Brand
2004-11-30 17:03                                 ` Hans Reiser
2004-12-14 16:58                                   ` Peter Foldiak
2004-12-14 17:21                                     ` Jan Engelhardt
2004-12-14 18:11                                       ` Peter Foldiak
2004-12-14 18:16                                         ` Jan Engelhardt
2004-12-14 17:24                                     ` Hans Reiser
2004-12-14 21:27                                       ` Peter Foldiak
2004-12-15  4:47                                         ` David Masover [this message]
2004-12-15  5:28                                           ` Hans Reiser
2004-12-16  0:16                                             ` David Masover
2004-12-16 18:52                                               ` Hans Reiser
2004-12-17 15:58                                                 ` David Masover
2004-12-17 16:52                                                   ` Hans Reiser
2004-12-18  1:52                                                     ` Horst von Brand
2004-12-20 17:21                                                       ` Hans Reiser
2004-12-15  9:27                                           ` Peter Foldiak
2004-12-15 23:56                                             ` David Masover
2004-12-16 18:48                                               ` Hans Reiser
2004-12-16 19:01                                                 ` Peter Foldiak
2004-12-17 18:09                                                   ` Hans Reiser
2004-12-18  0:20                                                     ` David Masover
2004-12-17 16:02                                                 ` David Masover
2004-12-17 16:54                                                   ` Hans Reiser
2004-12-15  5:19                                         ` Hans Reiser
2004-12-14 19:30                                     ` Horst von Brand
2004-12-15  4:52                                       ` David Masover
2004-12-15  5:31                                         ` Hans Reiser
2004-12-15  5:10                                       ` Hans Reiser
2004-12-15 13:28                                         ` Horst von Brand
2004-12-15 16:57                                           ` Hans Reiser
2004-12-15 19:11                                             ` Markus   Törnqvist
2004-12-15 20:57                                               ` Hans Reiser
2004-11-30 17:03                                 ` Peter Foldiak
2004-11-30 17:50                                   ` Horst von Brand
2004-11-30 18:23                                   ` Dr. Giovanni A. Orlando
2004-11-29 23:11                         ` Peter Foldiak
2004-11-30 16:04                   ` Martin Waitz
2004-11-27 12:49                 ` Markus   Törnqvist
2004-11-29 15:41                   ` Hans Reiser
2004-11-26 17:43         ` Hans Reiser
2004-11-27 11:50         ` Tomasz Torcz
2005-05-10  9:39         ` Peter Foldiak
2005-05-10 14:53           ` Hans Reiser
2005-05-10 15:32             ` Peter Foldiak
2005-05-10 16:30               ` Sean McGrath
2005-05-10 17:25                 ` Hans Reiser
2005-05-10 17:39                   ` Sean McGrath
2005-05-10 18:52                     ` Hans Reiser
2005-05-10 19:39                       ` Sean McGrath
2005-05-10 20:11                         ` Hans Reiser
2005-05-16 12:32               ` Leo Comerford
2005-05-10 15:14           ` Valdis.Kletnieks
2005-05-10 15:38             ` Peter Foldiak
2005-05-10 17:20               ` Hans Reiser
2005-05-11 10:23               ` Helge Hafting
2004-11-23  6:20   ` Amit Gud
2004-11-24 10:32     ` Helge Hafting
2004-11-24 11:07       ` Amit Gud
2004-11-25 23:09   ` Pavel Machek
2004-11-28 18:53     ` Helge Hafting
2004-11-28 19:01       ` Pavel Machek
2004-11-22 17:59 ` Valdis.Kletnieks
2004-11-22 18:24   ` Jan Engelhardt
2004-11-22 18:52   ` Hans Reiser
2004-11-22 19:05     ` Jan Engelhardt
2004-11-23  9:46       ` Amit Gud
2004-11-23 14:00         ` Jan Engelhardt
2004-11-23 14:17           ` Amit Gud
2004-11-23  9:11     ` Dirk Steinberg
2004-11-23  9:37       ` Markus   Törnqvist
2004-11-23 19:00       ` Hans Reiser
     [not found] <fa.imi6gu8.1e7qkqc@ifi.uio.no>
     [not found] ` <fa.hcr9rb0.k6egam@ifi.uio.no>
2004-11-26  4:11   ` Bodo Eggert

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=41BFC1C5.1070302@slaphack.com \
    --to=ninja@slaphack.com \
    --cc=Peter.Foldiak@st-andrews.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiser@namesys.com \
    --cc=reiserfs-list@namesys.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