[lkml]   [2004]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: silent semantic changes with reiser4
On Sat, Aug 28, 2004 at 10:01:23PM -0700, Linus Torvalds wrote:
> On Sat, 28 Aug 2004, Hans Reiser wrote:
> >
> > I object to openat().....
> Sound slike you object to O_XATTRS, not openat() itself.
> Realize that openat() works independently of any special streams, it's
> fundamentally a "look up name starting from this file" (rather than
> "starting from root" or "starting from cwd").

Linus, openat() is trivial to implement in userland *IF* we are talking
about stuff already in namespace. Proof:

int openat(int fd, char *path, int flags, mode_t mode)
int len = snprintf(NULL, 0, "/proc/self/%d/%s", fd, path);
char name[len + 1];
sprintf(name, "/proc/self/%d/%s", fd, path);
return open(name, flags, mode);

7 lines. Replace VLA with alloca() or malloc() in pre-C99 environment.

In other words, there's nothing magical about syscall itself - compatibility
with Solaris is not an issue here. And basic functionality (i.e. what you've
described above) can be trivially achieved with no extra primitives at all.

Now, if you want to use that puppy as explicit indicator of magic steps taken,
fine, but that again says nothing about the primitives we want to express the
magic steps in question - reproducing openat() as one of the libc functions
won't be hard anyway.

So I have to agree with Hans on that one - I believe that as a fundamental
primitive it's wrong choice. Convenient to have in libc - sure, why not?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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