lkml.org 
[lkml]   [2004]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: silent semantic changes with reiser4
I object to openat().....

My reason is that the things that distinguish between objects should be
the names, not the choice of system call. The reason for this is that
it improves closure and namespace unification to do so, because it
allows all the objects to be accessed within the same namespace.

Yes, it can be useful to allow a namespace to exclude some objects, but
that exclusion should not be mandated. If you want to exclude, you
should cd or chroot to /proc/nopseudos and find a view of the filesystem
that excludes metas, or mount with -nopseuodos.

Do you see why I say this? I can say a lot more about the damage of
fragmenting namespaces into multiple apis.... Why look at xattrs....;-)

Hans


Linus Torvalds wrote:

>
>
>I'm pretty confident that we can extend the VFS layer to support named
>streams (see the technical discussion with Al, rather than the flames in
>this thread). I also clearly believe that it is worth it, but I'm starting
>to wonder if we should have a special open flag to make people select the
>stream.
>
>If you look at the Solaris interface, the _nice_ part about "openat()" is
>that you can do something like
>
> file = open(filename, O_RDONLY);
> if (file < 0)
> return -ENOENT;
> icon = openat(file, "icon", O_RDONLY | O_XATTR);
> if (icon < 0)
> icon = default_icon_file;
> ..
>
>and it will work regardless of whether "filename" is a directory or a
>regular file, if I've understood correctly.
>
>Now, I think that makes sense for several reasons:
> - single case
> - race-free (think "stat()" vs "fstat()" races).
> - I think we want to do "openat()" regardless of whether we ever
> support extended attributes or not ("openat()" is nice for doing
> "namei()" in user space even in the absense of any attributes or
> named streams).
>
>So what we can do is
> - implement openat() regardless, and expect to do the Solaris thing for
> it if we ever do streams.
> - _also_ support the "implied named attributes" for regular files, so
> that you don't have to use "openat()" to access them.
>
>Comments? Does anybody hate "openat()" for any reason (regardless of
>attributes)? We can easily support it, we'd just need to pass in the file
>to use as part of the "nameidata" thing or add an argument (it would also
>possibly be cleaner if we made "fs->pwd" be a "struct file").
>
> Linus
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>
>
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:2.017 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site