All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <linux@treblig.org>
To: Valdis.Kletnieks@vt.edu
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	Andreas Gruenbacher <agruen@suse.de>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfs: new O_NODE open flag
Date: Fri, 25 Sep 2009 19:35:23 +0100	[thread overview]
Message-ID: <20090925183523.GA6065@gallifrey> (raw)
In-Reply-To: <9988.1253899252@turing-police.cc.vt.edu>

* Valdis.Kletnieks@vt.edu (Valdis.Kletnieks@vt.edu) 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?

I know it's not possible without this flag, my interest is whether
it would be possible WITH this flag to promote an fd opened with the
O_NODE to a normal fd, guaranteeing that it's still operating on the
same object.  The case I'm (vaguely) thinking of is open with O_NODE,
fstat it, come to the conslusion it's not a device and then proceed
to open it and read from it.

Dave


-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    | Running GNU/Linux on Alpha,68K| Happy  \ 
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

  reply	other threads:[~2009-09-25 17:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 14:51 [PATCH] vfs: new O_NODE open flag Miklos Szeredi
2009-09-25  0:23 ` Andreas Gruenbacher
2009-09-25  5:52   ` Miklos Szeredi
2009-09-25 12:37     ` Dr. David Alan Gilbert
2009-09-25 12:18       ` Miklos Szeredi
2009-09-25 17:08         ` Jamie Lokier
2009-09-25 16:53       ` Andreas Dilger
2009-09-25 17:20       ` Valdis.Kletnieks
2009-09-25 18:35         ` Dr. David Alan Gilbert [this message]
2009-09-25 21:18           ` Valdis.Kletnieks
2009-09-28 10:25             ` Miklos Szeredi
2009-09-28 13:28               ` Jamie Lokier
2009-09-28 14:07                 ` Miklos Szeredi
2009-09-28 14:10                   ` Jamie Lokier
2009-09-30  8:18                 ` Florian Weimer
2009-09-30  8:18                   ` Florian Weimer
2009-09-28 15:21               ` Andreas Dilger
2009-09-28 16:04                 ` Miklos Szeredi
2009-10-04 19:03                   ` Pavel Machek
2009-10-04 22:58                     ` Jamie Lokier
2009-10-23 17:10                       ` /proc filesystem allows bypassing directory permissions on Linux (was Re: [PATCH] vfs: new O_NODE open flag) Pavel Machek
2009-10-14 13:14                   ` [PATCH] vfs: new O_NODE open flag Andreas Gruenbacher
2009-09-25 19:02         ` Andreas Dilger
2009-09-28 15:53           ` Jamie Lokier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090925183523.GA6065@gallifrey \
    --to=linux@treblig.org \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=agruen@suse.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.