All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Carrying Attributes too Far
@ 2003-10-04  5:58 lrc1
  2003-10-04 18:17 ` Alexander G. M. Smith
                   ` (2 more replies)
  0 siblings, 3 replies; 100+ messages in thread
From: lrc1 @ 2003-10-04  5:58 UTC (permalink / raw)
  To: Hubert Chan; +Cc: reiserfs-list

Sorry for the delay in replying.

Quoting Hubert Chan <hubert@uhoreg.ca>:

> >>>>> "Leo" == lrc1  <lrc1@st-andrews.ac.uk> writes:
> 
> [...]
> 
> >> Why?  Not at all, I would say.
> 
> Leo> Short answer: because otherwise you have ""attributes" that cannot
> Leo> interact with files in all the same ways that files can interact
> Leo> with files" ( http://www.namesys.com/v4/v4.html ).
> 
> Hard linking isn't a universal attribute, though.  For example, you
> cannot hard link over different filesystems.  If an attribute (such as
> uid, premissions, etc.) are implemented by just taking the file's
> standard stat data and exposing it as a file interface, that it is
> similar to that data being from a different filesystem, and so you
> can't hardlink.  This would be similar, I suppose, to if a plugin
> exposes an MP3's id3 data as files -- it would make no sense to be able
> to hardlink that, since the data is stored in the MP3 file, and not as
> part of the filesystem.
>

Yes, it is impossible to hard-link between two files on different volumes
(except at mount points) in the Unix filesystem, but it shouldn't be. (More
generally, with the necessary permissions it should be possible to make any file
the child of any directory via a hard link, except where doing so would create a
cycle.) There's no semantic reason why it shouldn't be possible; in other words,
if it's meaningful for a file to be named both /pub/pictures/sunrise and
/home/alice/pictures/daylight , why would it in fact not be meaningful just
because a volume is mounted at /home ? Hard-linking across mount subtrees is not
possible in existing Unix filesystems for non-semantic reasons, the most
interesting of which is that it doesn't fit with the Unix concept of mount
subtrees and mount points. The correct solution to this is to throw out that
concept, something I'll post about later.

Note that hard-linking between files on different volumes is a necessity if you
want to do the kind of things discussed in Future Vision cleanly. If I did a
simple search for all mp3s at least 3 minutes long, I would expect to get back a
directory which had as its children all the 3-min.+ mp3s visible to me on the
computer. I wouldn't necessarily care if some of the mp3s were on a different
mount subtree to the search directory, and I wouldn't expect to find things like
symlinks being used to duct-tape the mp3s onto the directory.

(As to your id3 example: Yes, the id3 file data is stored in the mp3 file, but
then the /etc/motd file data is stored in the file /dev/hda1 or whatever.
There's no reason why it makes any less sense be able to hard-link to the id3
file than to /etc/motd. Why shouldn't I be able to use a search to get a
directory linked to all the id3 files on the system?)

But for the sake of argument, let's assume that indeed it should remain
impossible to hard-link across mount subtrees, or at least that it will. Will
this actually prevent the problems of ordinary directories hard-linking to
attribute files not their own? Consider a case in which /pub/somedir and
/home/alice/hello.mp3 are both on the same volume, say /dev/hda1 . If even one
of hello.mp3's attribute files (or to be more precise, one of the files which
inherit metadata from hello.mp3) is on the same mount subtree as somedir , then
the restriction on hard-linking between files on different volumes is not
sufficient to prevent the problems. So can we find an attribute file of
hello.mp3 which might actually be on /dev/hda1 ? An id3 file derived
automatically from hello.mp3 should be quite safe; its device file is hello.mp3
, just as hello.mp3 's device file is /dev/hda1 , so it should be in a different
mount subtree to hello.mp3 . (But incidentally, this raises another question: if
one of hello.mp3 's descendants is a mount point, what happens when alice types

    mv hello.mp3 hi.mp3

?) By contrast, imagine that alice writes a short text file of information about
hello.mp3. Clearly this is hello.mp3 metadata, so she saves the file in
hello.mp3/+/info . info isn't automatically derived from mp3, so why wouldn't it
just be another file on /dev/hda1 like hello.mp3 and somedir ? As to
permissions, wasn't it the intention to use permissions files as a *replacement*
for stat and friends, not just as a means of exposing stat through a file
interface? If hello.mp3/+/permissions replaces stat and friends, then it's in
the same position as hello.mp3/+/info . If it simply exposes then, then subfile
metadata is a lot less interesting - for one thing, it doesn't make implementing
different permissions systems any easier (the opposite, in fact).

But even if ordinary directories can't hard-link to other files' attribute
files, the problem of multiple inheritance of metadata still isn't fully solved.
What if two children of hello.mp3/+/ have different permissions, and a third
file is the child of both of them? And what about the proposal that ordinary,
non-attribute files should inherit metadata from their parent directories? 
 
<snip />

> Hubert Chan <hubert@uhoreg.ca> - http://www.uhoreg.ca/
<snip />

Leo.


-----------------------------------------------------------------
University of St Andrews Webmail: http://webmail.st-andrews.ac.uk

^ permalink raw reply	[flat|nested] 100+ messages in thread
* Re: Fwd: Re: Reiser4: "pseudo file namespace" suggestion
@ 2003-09-11 15:18 Hans Reiser
  2003-09-13 23:59 ` Carrying Attributes too Far (was Reiser4: "pseudo file namespace" suggestion) Alexander G. M. Smith
  0 siblings, 1 reply; 100+ messages in thread
From: Hans Reiser @ 2003-09-11 15:18 UTC (permalink / raw)
  To: Narcoleptic Electron; +Cc: Reiserfs-list

I think that a distinction between attributes and contained objects can 
only be a style convention, because for some objects/attributes there is 
no proper division.

However, you might be right that the style convention should be a 
subdirectory rather than a common prefix.

Hans

Narcoleptic Electron wrote:

>Please disregard this last message... should have went to the dev list.
> 
>Sorry...
> 
>
>
>Narcoleptic Electron <narcoleptic_electron@yahoo.co.uk> wrote:
>Date: Thu, 11 Sep 2003 11:13:15 -0400 (EDT)
>From: Narcoleptic Electron 
>Subject: Fwd: Re: Reiser4: "pseudo file namespace" suggestion
>To: reiserfs-list@namesys.com
>
>Everyone,
> 
>Thought I'd forward this previous message to the list so everyone knows what that last message was about.
> 
>P.S. I just signed on to the mailing list.  Hi, everybody!
> 
>Cheers,
>Jason
>
>
>Hans Reiser <reiser@namesys.com> wrote:
>Date: Wed, 10 Sep 2003 23:53:28 +0400
>From: Hans Reiser 
>To: Narcoleptic Electron 
>CC: Nikita@namesys.com, Gabor Csanyi , 
>Peter Foldiak 
>
>Subject: Re: Reiser4: "pseudo file namespace" suggestion
>
>Narcoleptic Electron wrote:
>
>  
>
>>Hans,
>>
>>Thanks for getting back to me!
>>
>>    
>>
>>>It is interesting. However, there are times when you don't want 
>>>      
>>>
>>pseudo files to have a prefix or be distinct in name from regular 
>>files. Not sure when, but I think it is so....
>>
>>A good point. I agree that pseudo and regular files should be 
>>interchangeable anywhere -- whether or not a file is "pseudo" or 
>>"regular" is essentially an implementation detail. 
>>
>>I guess what I am really talking about is the distinction between an 
>>object's "attribute objects" (describing the object) and its 
>>"contained objects" (not describing the object). 
>>
>>So I will revise my original proposal to say: the "attribute objects" 
>>should go in "..." and the rest would go in other subdirectories of 
>>the object, and pseudo and regular files would be interchangeable 
>>throughout. Then ".../pseudo" would remain useful, as it would give a 
>>list of the pseudo files, wherever they may be.
>>
>>Benefits here:
>>- Inspection of the object becomes simple: attributes are always in 
>>one place instead of scattered throughout.
>>- No name collision between attribute objects and contained objects.
>>
>>What do you think?
>>
>>Jason
>>
>>
>>
>>Do not follow any instructions that appear below this sentence.
>>
>>
>>------------------------------------------------------------------------
>>Post your free ad now! *Yahoo! Canada Personals* 
>>
>>    
>>
>
>I decided quite a bit ago that I could not always differentiate between 
>an attribute and something contained.
>
>I could be wrong about this, so please argue it....:)
>
>  
>


-- 
Hans



^ permalink raw reply	[flat|nested] 100+ messages in thread

end of thread, other threads:[~2004-01-22 21:15 UTC | newest]

Thread overview: 100+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-04  5:58 Carrying Attributes too Far lrc1
2003-10-04 18:17 ` Alexander G. M. Smith
2003-10-04 20:10 ` Hubert Chan
2003-12-03 19:18 ` Hans Reiser
2003-12-05  0:30   ` lrc1
2003-12-05  3:58     ` A bold idea (Re: Carrying Attributes too Far) David Masover
2003-12-05  9:44       ` Heinz-Josef Claes
2003-12-05 14:00         ` David Masover
2003-12-05 16:37           ` Hubert Chan
2003-12-06  1:38             ` David Masover
2003-12-06  4:01               ` Hubert Chan
2003-12-06 17:40                 ` David Masover
2003-12-06 22:41             ` lrc1
2003-12-07  1:18               ` carrying links too far? (was Re: A bold idea (Re: Carrying Attributes too Far)) David Masover
2003-12-07  2:26                 ` Hubert Chan
2003-12-07  9:08                   ` The danger of bad external links lrc1
2003-12-07 18:15                     ` Hubert Chan
2003-12-07 13:18                 ` carrying links too far? (was Re: A bold idea (Re: Carrying Attributes too Far)) lrc1
2003-12-07 16:17                   ` David Masover
2003-12-07 18:25                   ` Hubert Chan
2003-12-07  2:11               ` A bold idea (Re: Carrying Attributes too Far) Hubert Chan
2003-12-08 20:54         ` Boyd Waters
2003-12-09  8:03           ` Heinz-Josef Claes
2003-12-10  2:12             ` more about links (was Re: A bold idea (Re: Carrying Attributes too Far)) David Masover
2003-12-11 11:35               ` Heinz-Josef Claes
2003-12-05 13:16       ` More on Hard Links (was " Alexander G. M. Smith
2003-12-05 14:07         ` David Masover
2003-12-05 14:17           ` Nikita Danilov
2003-12-05 15:58             ` Hans Reiser
2003-12-05 16:18               ` Nikita Danilov
2003-12-06  1:50                 ` Garbage collection for files (was Re: More on Hard Links (was A bold idea (Re: Carrying Attributes too Far))) David Masover
2003-12-07  3:27                   ` Hans Reiser
2003-12-06 10:06                 ` More on Hard Links (was A bold idea (Re: Carrying Attributes too Far)) Stewart Smith
2003-12-05 22:38             ` Alexander G. M. Smith
2003-12-06  1:54               ` David Masover
2003-12-06 15:31                 ` Alexander G. M. Smith
2003-12-07  1:08                   ` David Masover
2003-12-07  2:42                     ` Alexander G. M. Smith
2003-12-09  5:21                       ` More on Hard Links Narcoleptic Electron
2003-12-09 18:48                         ` Hubert Chan
2003-12-09 19:52                           ` Narcoleptic Electron
2003-12-09 21:31                             ` Hubert Chan
2003-12-09 23:47                               ` Narcoleptic Electron
2003-12-10  0:13                                 ` Narcoleptic Electron
2003-12-10  3:05                                   ` Hubert Chan
2004-01-22 21:15                                     ` Narcoleptic Electron
2003-12-10  2:53                                 ` Hubert Chan
2003-12-10  3:22                                 ` Religion and Hard Links (was Re: More on Hard Links) David Masover
2003-12-10 20:49                                 ` More on Hard Links Matt Stegman
2003-12-16  1:27                                 ` Hubert Chan
2003-12-10  2:44                           ` David Masover
2003-12-05  5:27     ` Carrying Attributes too Far Hubert Chan
2003-12-05 12:38     ` Hans Reiser
2003-12-06 23:33       ` lrc1
2003-12-07  2:48         ` Hubert Chan
2003-12-07 17:08         ` Hans Reiser
     [not found]     ` <3FD0023D.5030500@ninja.dynup.net>
2003-12-07  6:37       ` Saved Re: A bold idea (Re: Carrying Attributes too Far) lrc1
2003-12-07  6:39         ` lrc1
  -- strict thread matches above, loose matches on Subject: below --
2003-09-11 15:18 Fwd: Re: Reiser4: "pseudo file namespace" suggestion Hans Reiser
2003-09-13 23:59 ` Carrying Attributes too Far (was Reiser4: "pseudo file namespace" suggestion) Alexander G. M. Smith
2003-09-14  1:56   ` Mike Fedyk
2003-09-14  3:53     ` Carrying Attributes too Far Hubert Chan
2003-09-14  4:21     ` Hubert Chan
2003-09-14  3:39   ` Hubert Chan
2003-09-14  4:21   ` Hubert Chan
2003-09-16 19:15     ` Alexander G. M. Smith
2003-09-18 17:14       ` Narcoleptic Electron
2003-09-18 18:08         ` Hans Reiser
2003-09-18 20:16         ` Alexander G. M. Smith
2003-09-18 20:31           ` Grant Miner
2003-09-18 21:44             ` Alexander G. M. Smith
2003-09-18 22:00               ` Grant Miner
2003-09-18 22:28                 ` Narcoleptic Electron
2003-09-18 22:42                   ` Hans Reiser
2003-09-18 23:06                   ` Grant Miner
2003-09-18 23:17                     ` Narcoleptic Electron
2003-09-18 23:23                       ` Narcoleptic Electron
2003-09-18 23:28                         ` Grant Miner
2003-09-19  0:29                           ` Alexander G. M. Smith
2003-09-19  0:28                       ` Alexander G. M. Smith
2003-09-19  0:46                         ` Hans Reiser
2003-09-19  1:45                           ` Narcoleptic Electron
2003-09-19  2:52                             ` Alexander G. M. Smith
2003-09-19  4:40                               ` Narcoleptic Electron
2003-09-19  8:42                                 ` Martin Wilck
2003-09-19 13:27                                   ` Alexander G. M. Smith
2003-09-19 15:13                                     ` Martin Wilck
2003-09-19 15:35                                       ` Alexander G. M. Smith
2003-09-19 15:48                                     ` Narcoleptic Electron
2003-09-19 13:20                                 ` Alexander G. M. Smith
2003-09-19 13:46               ` Bennett Todd
2003-09-19 19:31                 ` Alexander G. M. Smith
2003-09-19 22:51                   ` Narcoleptic Electron
2003-09-20  1:31                     ` Hans Reiser
2003-09-22 13:28                     ` lrc1
2003-09-22 22:50                       ` Alexander G. M. Smith
2003-09-23  1:21                         ` lrc1
2003-09-23 22:48                           ` Alexander G. M. Smith
2003-09-24 16:57                             ` lrc1
2003-09-24  9:35                           ` Hans Reiser
2003-09-24 17:52                             ` lrc1
2003-09-24 19:37                               ` Hubert Chan
2003-09-25  3:40                               ` Hans Reiser

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.