login
Header Space

 
 

file-as-dir vs. dir? (was Re: silent semantic changes with reiser4)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Date: Tuesday, September 14, 2004 - 12:27 am

(Apologies for beating on a dead horse here...)

I seems like one confusion here is that everyone has a different idea of 
what the semantics we're talking about are.  I see two main ones:

Hans's: A file, a directory, and an attribute are functionally 
equivalent (except for S_ISxxx and hardlinks).  That is, /usr/bin/metas 
makes sense, and it's not talking about a program called metas.  This 
also means that /foo/metas/metas might exist and needs dealing with.

Linus's (I think):  A directory is just a directory (no attributes and 
no read()able data).  A file can contain attributes, where attributes 
can be "file" attributes or "directory" attributes.  That is, a file is 
also a subtree with posix-like semantics (except for hardlink stuff). 
So doing "touch /tmp/foo; cat /tmp/foo/metas" fails, rather than doing 
something that's probably useless.  "touch /tmp/foo; touch /tmp/foo/bar; 
touch /tmp/foo/bar/baz" fails on the last touch because bar is a file 
attribute and recursive magic is disallowed.

Which one are we talking about?

FWIW, I like the latter version a lot better, as it removes a lot of 
ambiguity.  If I see a path like /tmp/foo/metas/uid, it is either a uid 
attribute (i.e. writing it has security implications) or it is a 
standard file (i.e. writing it  just writes it).  But _I can tell which 
one_ by fstat()ing /tmp/foo!  If it's a directory, than I have either a 
named stream called uid or a genuine file called uid (and I can tell 
which by fstat()ing /tmp/foo/metas), but if it's a file then I have the 
magic uid.  And I'm guaranteed that there's no other funny business, 
because /tmp/foo is a "file with a subtree," which means that it's not 
an attribute.  This way I know exactly what I'm dealing with.

As an added bonus, we could have O_NOMETAS which means that "files" may 
not be traversed.  Then someone who wants to make sure they get a real 
file can do it.  If recursive files-as-dirs were allowed, that might not 
do quite what the caller expected.  If you really wanted a directory 
with some data attached, but it in dir/.mystuff, because that's probably 
what you meant, and any existing tool will do exactly the right thing 
with it.

In the former version, AFAIK, I have a mess.  In UNIX, a path is a path. 
  It's trivial to understand and there's no funny business parsing it. 
But now a path has a slippery meaning where the token "metas" could be a 
plain old token or it could be magic or it could be magic some other 
way.  The security implications and the possbility for something to 
break horribly are scary.

--Andy
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
silent semantic changes with reiser4, Christoph Hellwig, (Tue Aug 24, 4:25 pm)
file-as-dir vs. dir? (was Re: silent semantic changes with r..., Andy Lutomirski, (Tue Sep 14, 12:27 am)
Re: silent semantic changes with reiser4, Hans Reiser, (Wed Aug 25, 3:53 pm)
Re: silent semantic changes with reiser4, Chris Friesen, (Wed Aug 25, 4:23 pm)
Re: silent semantic changes with reiser4, Jeremy Allison, (Wed Aug 25, 4:20 pm)
Re: silent semantic changes with reiser4, Hans Reiser, (Thu Aug 26, 4:42 am)
Re: silent semantic changes with reiser4, Rik van Riel, (Thu Aug 26, 9:27 am)
Re: silent semantic changes with reiser4, Hans Reiser, (Thu Aug 26, 7:53 pm)
Re: silent semantic changes with reiser4, Markus , (Thu Aug 26, 9:56 am)
Re: silent semantic changes with reiser4, Paul Jackson, (Thu Aug 26, 3:58 pm)
Re: silent semantic changes with reiser4, Christoph Hellwig, (Wed Aug 25, 4:08 pm)
Re: silent semantic changes with reiser4, Linus Torvalds, (Wed Aug 25, 4:22 pm)
Re: silent semantic changes with reiser4, Mikulas Patocka, (Wed Aug 25, 8:18 pm)
Re: silent semantic changes with reiser4, Linus Torvalds, (Wed Aug 25, 8:27 pm)
Re: silent semantic changes with reiser4, Mikulas Patocka, (Wed Aug 25, 8:51 pm)
Re: silent semantic changes with reiser4, Hans Reiser, (Thu Aug 26, 4:36 am)
Re: silent semantic changes with reiser4, Jamie Lokier, (Thu Aug 26, 6:53 am)
Re: silent semantic changes with reiser4, Christoph Hellwig, (Thu Aug 26, 6:59 am)
Re: silent semantic changes with reiser4, Spam, (Thu Aug 26, 7:17 am)
Re: silent semantic changes with reiser4, Jamie Lokier, (Thu Aug 26, 7:07 am)
Re: silent semantic changes with reiser4, Rik van Riel, (Wed Aug 25, 8:57 pm)
Re: silent semantic changes with reiser4, Hans Reiser, (Thu Aug 26, 4:40 am)
Re: silent semantic changes with reiser4, Lars Marowsky-Bree, (Thu Aug 26, 10:46 am)
Re: silent semantic changes with reiser4, Helge Hafting, (Thu Aug 26, 3:51 am)
Re: silent semantic changes with reiser4, Paul Jackson, (Thu Aug 26, 5:21 am)
Re: silent semantic changes with reiser4, Helge Hafting, (Fri Aug 27, 8:33 am)
Re: silent semantic changes with reiser4, Jamie Lokier, (Thu Aug 26, 6:47 am)
Re: silent semantic changes with reiser4, Paul Jackson, (Thu Aug 26, 7:19 am)
Re: silent semantic changes with reiser4, Paul Jackson, (Thu Aug 26, 5:44 am)
Re: silent semantic changes with reiser4, Hans Reiser, (Thu Aug 26, 4:43 am)
Re: silent semantic changes with reiser4, Hans Reiser, (Wed Aug 25, 4:41 pm)
Re: silent semantic changes with reiser4, Rik van Riel, (Wed Aug 25, 5:03 pm)
Re: silent semantic changes with reiser4, Hans Reiser, (Thu Aug 26, 5:00 am)
Re: silent semantic changes with reiser4, Markus T, (Wed Aug 25, 4:58 pm)
Re: silent semantic changes with reiser4, Chris Mason, (Wed Aug 25, 4:51 pm)
Re: silent semantic changes with reiser4, Michael Halcrow, (Thu Aug 26, 9:53 am)
Re: silent semantic changes with reiser4, Hans Reiser, (Thu Aug 26, 6:26 pm)
Re: silent semantic changes with reiser4, Matt Mackall, (Wed Aug 25, 5:52 pm)
Re: silent semantic changes with reiser4, Linus Torvalds, (Wed Aug 25, 6:21 pm)
Re: silent semantic changes with reiser4, Christoph Hellwig, (Wed Aug 25, 4:35 pm)
Re: silent semantic changes with reiser4, Linus Torvalds, (Wed Aug 25, 5:00 pm)
Re: silent semantic changes with reiser4, Jamie Lokier, (Wed Aug 25, 8:11 pm)
Re: silent semantic changes with reiser4, Jamie Lokier, (Wed Aug 25, 9:00 pm)
Re: silent semantic changes with reiser4, Hans Reiser, (Thu Aug 26, 4:49 am)
Re: silent semantic changes with reiser4, Joel Becker, (Thu Aug 26, 2:35 pm)
Re: silent semantic changes with reiser4, Markus T, (Fri Aug 27, 5:19 am)
Re: silent semantic changes with reiser4, Matthew Wilcox, (Fri Aug 27, 8:26 am)
Re: silent semantic changes with reiser4, Jamie Lokier, (Thu Aug 26, 3:53 pm)
Re: silent semantic changes with reiser4, Adrian Bunk, (Thu Aug 26, 10:05 am)
Re: silent semantic changes with reiser4, Jamie Lokier, (Thu Aug 26, 11:02 am)
Re: silent semantic changes with reiser4, Horst von Brand, (Sat Aug 28, 7:14 pm)
Re: The argument for fs assistance in handling archives (was..., Christer Weinigel, (Mon Sep 6, 11:55 am)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Thu Sep 2, 4:38 pm)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Mon Sep 6, 4:08 am)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Mon Sep 6, 8:54 am)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Thu Sep 2, 7:52 pm)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Thu Sep 2, 7:41 pm)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Thu Sep 2, 5:48 pm)
Re: The argument for fs assistance in handling archives, Clemens Schwaighofer, (Mon Sep 6, 8:53 am)
Re: The argument for fs assistance in handling archives, Clemens Schwaighofer, (Mon Sep 6, 8:59 am)
Re: The argument for fs assistance in handling archives, Frank van Maarseveen, (Mon Sep 6, 9:01 am)
Re: The argument for fs assistance in handling archives, Clemens Schwaighofer, (Mon Sep 6, 9:17 am)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 8:08 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 9:28 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Fri Sep 3, 12:37 am)
Re: The argument for fs assistance in handling archives, Horst von Brand, (Fri Sep 3, 9:09 am)
Re: The argument for fs assistance in handling archives, Linus Torvalds, (Thu Sep 2, 8:18 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 9:25 pm)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Thu Sep 2, 6:02 pm)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Thu Sep 2, 6:11 pm)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Thu Sep 2, 6:26 pm)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Mon Sep 6, 4:41 am)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Thu Sep 2, 6:56 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Fri Sep 3, 7:55 pm)
Re: The argument for fs assistance in handling archives, Helge Hafting, (Wed Sep 8, 5:56 am)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Fri Sep 3, 4:50 am)
Re: The argument for fs assistance in handling archives (was..., Frank van Maarseveen, (Fri Sep 3, 4:55 am)
Re: The argument for fs assistance in handling archives, Dr. Giovanni A. Orlando, (Mon Sep 6, 5:15 am)
Re: The argument for fs assistance in handling archives, Grzegorz Jaśkiewicz, (Mon Sep 6, 8:55 am)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 8:17 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Fri Sep 3, 7:45 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Fri Sep 3, 8:13 pm)
Re: The argument for fs assistance in handling archives, Stephan von Krawczynski, (Sat Sep 4, 7:42 am)
Re: The argument for fs assistance in handling archives, David Masover, (Sat Sep 4, 2:27 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Sat Sep 4, 1:37 am)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 8:25 pm)
Re: The argument for fs assistance in handling archives, Dave Kleikamp, (Fri Sep 3, 8:50 am)
Re: The argument for fs assistance in handling archives, David Masover, (Fri Sep 3, 8:25 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Wed Sep 1, 11:35 pm)
Re: The argument for fs assistance in handling archives, Linus Torvalds, (Wed Sep 1, 11:38 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 12:27 am)
Re: The argument for fs assistance in handling archives, Linus Torvalds, (Thu Sep 2, 2:04 am)
Re: The argument for fs assistance in handling archives, Robin Rosenberg, (Thu Sep 2, 3:55 am)
Re: The argument for fs assistance in handling archives, Linus Torvalds, (Thu Sep 2, 3:36 am)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 9:11 pm)
Re: The argument for fs assistance in handling archives, Linus Torvalds, (Thu Sep 2, 1:50 pm)
Re: The argument for fs assistance in handling archives, Horst von Brand, (Thu Sep 2, 11:32 am)
Re: The argument for fs assistance in handling archives, Timothy Miller, (Wed Sep 15, 1:23 pm)
Re: The argument for fs assistance in handling archives, Helge Hafting, (Thu Sep 16, 4:29 am)
Re: The argument for fs assistance in handling archives, Martin J. Bligh, (Thu Sep 2, 2:22 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 8:41 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 9:34 pm)
Re: The argument for fs assistance in handling archives, Steve Bergman, (Thu Sep 2, 3:52 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 8:35 pm)
Re: The argument for fs assistance in handling archives, Horst von Brand, (Fri Sep 3, 1:26 pm)
Re: The argument for fs assistance in handling archives, Bernd Petrovitsch, (Fri Sep 3, 4:49 am)
Re: The argument for fs assistance in handling archives, Martin J. Bligh, (Thu Sep 2, 4:16 pm)
Re: The argument for fs assistance in handling archives, Christer Weinigel, (Thu Sep 2, 2:38 pm)
Re: The argument for fs assistance in handling archives, Brian Beattie, (Fri Sep 3, 9:16 am)
Re: The argument for fs assistance in handling archives, Linus Torvalds, (Thu Sep 2, 1:43 pm)
Re: The argument for fs assistance in handling archives, John Stoffel, (Thu Sep 2, 10:24 am)
Re: The argument for fs assistance in handling archives, Horst von Brand, (Thu Sep 2, 11:40 am)
Re: The argument for fs assistance in handling archives, Helge Hafting, (Fri Sep 3, 4:30 am)
Re: The argument for fs assistance in handling archives, Oliver Neukum, (Thu Sep 2, 7:09 am)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 8:43 pm)
Re: The argument for fs assistance in handling archives, Christoph Hellwig, (Fri Sep 3, 4:13 am)
Re: The argument for fs assistance in handling archives, Oliver Neukum, (Fri Sep 3, 4:30 am)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 9:39 pm)
Re: The argument for fs assistance in handling archives, David Masover, (Thu Sep 2, 9:36 pm)
Re: The argument for fs assistance in handling archives, John Stoffel, (Thu Sep 2, 10:35 am)
Re: The argument for fs assistance in handling archives, Helge Hafting, (Thu Sep 2, 5:26 am)
Re: The argument for fs assistance in handling archives, Helge Hafting, (Fri Sep 3, 4:22 am)
Re: The argument for fs assistance in handling archives, Horst von Brand, (Fri Sep 3, 1:41 pm)
Re: The argument for fs assistance in handling archives, Helge Hafting, (Mon Sep 6, 9:25 am)
Re: The argument for fs assistance in handling archives, Horst von Brand, (Fri Sep 3, 10:27 pm)
Re: The argument for fs assistance in handling archives, Helge Hafting, (Mon Sep 6, 9:43 am)
Re: The argument for fs assistance in handling archives, Alexander G. M. Smith, (Sat Sep 4, 9:20 am)
Re: The argument for fs assistance in handling archives, Helge Hafting, (Wed Sep 8, 5:24 am)
Re: The argument for fs assistance in handling archives, Helge Hafting, (Thu Sep 9, 7:22 am)
Re: The argument for fs assistance in handling archives, Helge Hafting, (Fri Sep 3, 4:28 am)
Re: The argument for fs assistance in handling archives, Christian Mayrhuber, (Thu Sep 2, 10:38 am)
Re: The argument for fs assistance in handling archives, David Masover, (Wed Sep 1, 11:46 pm)
Re: silent semantic changes with reiser4, Timothy Miller, (Thu Sep 9, 10:13 pm)
Re: silent semantic changes with reiser4, Hans Reiser, (Fri Sep 10, 1:22 am)
Re: silent semantic changes with reiser4, Horst von Brand, (Fri Sep 10, 11:33 am)
Re: silent semantic changes with reiser4, Alexander G. M. Smith, (Fri Sep 10, 8:16 am)
Re: silent semantic changes with reiser4, Hans Reiser, (Fri Sep 10, 12:32 pm)
Re: silent semantic changes with reiser4, Peter Foldiak, (Fri Sep 10, 2:32 am)
Re: silent semantic changes with reiser4, Hans Reiser, (Fri Sep 10, 2:57 am)
Re: silent semantic changes with reiser4, Timothy Miller, (Fri Sep 10, 11:47 am)
Re: silent semantic changes with reiser4, Hans Reiser, (Fri Sep 10, 1:51 pm)
Re: silent semantic changes with reiser4, Horst von Brand, (Fri Sep 10, 2:15 pm)
Re: silent semantic changes with reiser4, Timothy Miller, (Fri Sep 10, 8:00 pm)
Re: silent semantic changes with reiser4, Wayne Scott, (Fri Sep 10, 11:50 am)
Re: silent semantic changes with reiser4, Horst von Brand, (Fri Sep 10, 1:50 pm)
Re: silent semantic changes with reiser4, Christophe Saout, (Thu Aug 26, 10:25 am)
Re: silent semantic changes with reiser4, Jamie Lokier, (Thu Aug 26, 11:04 am)
Re: silent semantic changes with reiser4, Alex Zarochentsev, (Sun Aug 29, 8:34 am)
Re: silent semantic changes with reiser4, Jamie Lokier, (Wed Sep 1, 6:05 pm)
Re: silent semantic changes with reiser4, Shaya Potter, (Sun Aug 29, 11:52 am)
Re: silent semantic changes with reiser4, Nikita Danilov, (Thu Aug 26, 11:41 am)
Re: silent semantic changes with reiser4, Christophe Saout, (Thu Aug 26, 11:12 am)
Re: silent semantic changes with reiser4, Jamie Lokier, (Thu Aug 26, 12:00 pm)
Re: silent semantic changes with reiser4, Hans Reiser, (Thu Aug 26, 10:17 pm)
Re: silent semantic changes with reiser4, Matthew Wilcox, (Thu Aug 26, 10:45 am)
Re: silent semantic changes with reiser4, Chris Wedgwood, (Thu Aug 26, 6:05 am)
Re: silent semantic changes with reiser4, Pavel Machek, (Fri Aug 27, 5:01 pm)
Re: silent semantic changes with reiser4, Jamie Lokier, (Thu Aug 26, 7:02 am)
Re: silent semantic changes with reiser4, Will Dyson, (Thu Aug 26, 11:50 am)
Re: silent semantic changes with reiser4, Lee Revell, (Thu Aug 26, 4:38 pm)
Re: silent semantic changes with reiser4, Jamie Lokier, (Thu Aug 26, 5:00 pm)
Re: silent semantic changes with reiser4, Christophe Saout, (Thu Aug 26, 4:50 pm)
Re: silent semantic changes with reiser4, Lee Revell, (Thu Aug 26, 4:57 pm)
Re: silent semantic changes with reiser4, Markus T, (Fri Aug 27, 5:21 am)