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 13:37:47 +0100 Message-ID: <20090925123747.GA31228@gallifrey> References: <200909250223.58664.agruen@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andreas Gruenbacher , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Miklos Szeredi Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org * Miklos Szeredi (miklos@szeredi.hu) wrote: > On Fri, 25 Sep 2009, Andreas Gruenbacher wrote: > > On Thursday, 24 September 2009 16:51:58 Miklos Szeredi wrote: > > > This patch adds a new open flag, O_NODE. This flag means: open just > > > the filesystem node instead of the object referenced by the node. > > > > What is the intended use for O_NODE? > > It lets userspace file descriptors reference a inode without actually > "dereferencing" it to get the underlying object. This allows for a > couple of new things: > > - opening a special file (device/socket/fifo) without side effects > > - opening a symlink > > - opening any type of file without any permission is also possible > (of course the resuling file descriptor may not be read or written) > > The above allows fstat(), fchmod(), ioctl(), etc to be used for files > previously not possible. Given an fd opened in this way is it possible to reopen it normally and be guarenteed to get the same object? 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 |_______/