[lkml]   [2004]   [Aug]   [28]   [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 11:09:38AM -0700, Linus Torvalds wrote:
    > 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.

    Hurrah ! Definately the best way to go as far as Samba is concerned.
    Makes our portability easier. Now the NT interface allows an open on
    a named data stream without an open on the containing file (ie.
    you can do CreateFile("filename::STREAMNAME",....) without doing
    CreateFile("filename",..." first, but I personally think those
    semantics are a nasty hack. It makes much more sense (IMHO) to
    ensure that you already have an open fd on a file before allowing
    access to the named streams inside, Windows be damned. If we have
    some semantic issues mapping from the Windows semantics to Solaris/Linux
    semantics then so be it, it's a Samba problem so to speak :-).


    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.022 / U:5.608 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site