From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dr. David Alan Gilbert" Subject: Re: [PATCH] vfs: new O_NODE open flag Date: Fri, 25 Sep 2009 19:35:23 +0100 Message-ID: <20090925183523.GA6065@gallifrey> References: <200909250223.58664.agruen@suse.de> <20090925123747.GA31228@gallifrey> <9988.1253899252@turing-police.cc.vt.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Miklos Szeredi , Andreas Gruenbacher , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Valdis.Kletnieks@vt.edu Return-path: Received: from mx.treblig.org ([80.68.94.177]:44102 "EHLO mx.treblig.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751295AbZIYRfY (ORCPT ); Fri, 25 Sep 2009 13:35:24 -0400 Content-Disposition: inline In-Reply-To: <9988.1253899252@turing-police.cc.vt.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: * 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 |_______/