Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752351AbZI1PV5 (ORCPT ); Mon, 28 Sep 2009 11:21:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751709AbZI1PV4 (ORCPT ); Mon, 28 Sep 2009 11:21:56 -0400 Received: from sca-es-mail-1.Sun.COM ([192.18.43.132]:61167 "EHLO sca-es-mail-1.sun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751400AbZI1PVz (ORCPT ); Mon, 28 Sep 2009 11:21:55 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-disposition: inline Content-type: text/plain; CHARSET=US-ASCII Date: Mon, 28 Sep 2009 09:21:28 -0600 From: Andreas Dilger Subject: Re: [PATCH] vfs: new O_NODE open flag In-reply-to: To: Miklos Szeredi Cc: Valdis.Kletnieks@vt.edu, linux@treblig.org, agruen@suse.de, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Message-id: <20090928152128.GA3384@webber.adilger.int> X-GPG-Key: 1024D/0D35BED6 X-GPG-Fingerprint: 7A37 5D79 BF1B CECA D44F 8A29 A488 39F5 0D35 BED6 References: <200909250223.58664.agruen@suse.de> <20090925123747.GA31228@gallifrey> <9988.1253899252@turing-police.cc.vt.edu> <20090925183523.GA6065@gallifrey> <19645.1253913514@turing-police.cc.vt.edu> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 807 Lines: 27 On Sep 28, 2009 12:25 +0200, Miklos Szeredi wrote: > BTW I just checked, and it is possible to re-open or promote an fd > opened with O_NODE like this: > > char tmp[64]; > > fd = open(filename, O_NODE | O_NOACCESS); > /* ... */ > sprintf(tmp, "/proc/self/fd/%i", fd); > fd_rw = open(tmp, O_RDWR); > > Now fd_rw is guaranteed to refer to the same inode as fd. It seems very unpleasant to require applications using O_NODE to reopen files using /proc. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/