[lkml]   [2009]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] vfs: new O_NODE open flag
    On Sep 25, 2009  13:20 -0400, wrote:
    > On Fri, 25 Sep 2009 13:37:47 BST, "Dr. David Alan Gilbert" said:
    > > Given an fd opened in this way is it possible to reopen it normally and
    > > be guarenteed to get the same object?
    > It's not possible even without this flag. Consider:
    > fd1 = open("/tmp/foo",flags);
    > rc = rename("/tmp/foo","/tmp/bar");
    > fd2 = open("/tmp/foo",flags);
    > Or were you asking if *absent that sort of tomfoolery* if it would work?

    No, the point is that we HAVE an fd that points to the original "/tmp/foo"
    opened with O_NODE, and now (after an ioctl, stat, etc) we decide it is
    safe to open the file read and/or write without releasing the existing
    fd. The whole point is to AVOID this kind of tomfoolery.

    Cheers, Andreas
    Andreas Dilger
    Sr. Staff Engineer, Lustre Group
    Sun Microsystems of Canada, Inc.

     \ /
      Last update: 2009-09-25 21:05    [W:0.022 / U:0.088 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site