From mboxrd@z Thu Jan 1 00:00:00 1970 From: DENIEL Philippe Subject: Re: [RFC PATCH] Generic name to handle and open by handle syscalls Date: Thu, 11 Mar 2010 14:14:34 +0100 Message-ID: <4B98ECBA.5060601@cea.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: linux-fsdevel@vger.kernel.org Return-path: Received: from oxalide-out.extra.cea.fr ([132.168.224.1]:41628 "EHLO oxalide-out.extra.cea.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752934Ab0CKO1E (ORCPT ); Thu, 11 Mar 2010 09:27:04 -0500 Received: from pisaure.intra.cea.fr (pisaure.intra.cea.fr [132.166.88.21]) by oxalide.extra.cea.fr (8.14.2/8.14.2/CEAnet-Internet-out-2.0) with ESMTP id o2BDEZh7027813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 11 Mar 2010 14:14:35 +0100 Received: from muguet1.intra.cea.fr (muguet1.intra.cea.fr [132.166.192.6]) by pisaure.intra.cea.fr (8.14.2/8.14.2) with ESMTP id o2BDEYfZ021204 for ; Thu, 11 Mar 2010 14:14:35 +0100 (envelope-from Philippe.DENIEL@CEA.FR) Received: from zia.bruyeres.cea.fr (esteban.dam.intra.cea.fr [132.165.76.10]) by muguet1.intra.cea.fr (8.13.8/8.13.8/CEAnet-Intranet-out-1.1) with SMTP id o2BDEYTY010820 for ; Thu, 11 Mar 2010 14:14:34 +0100 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi, I just found this message in this mailing list archive. This follows a search I did after having a look at this thread on LWN.net (http://lwn.net/Articles/375888/). > The below set of patches implement open by handle support using exportfs > operations. This allows user space application to map a file name to file > handle and later open the file using handle. This should be usable > for userspace NFS and 9P server. XFS already support this with the ioctls > XFS_IOC_PATH_TO_HANDLE and XFS_IOC_OPEN_BY_HANDLE. After reading the mailing-list archive, it sounds like many people do not see the benefit in having a way to address files from user space via their fh and not only through the use of their name. I am leading a project (see http://nfs-ganesha.sourceforge.net) that implements NFS functionality from User Space. My server has various backends modules that make it possible to address different kind of namespaces. When we did the one dedicated to POSIX, we were strongly limited by the POSIX functions that reference the files only by their names. We implemented kind of "name <-> fh" tracking feature via the use of a db, but it is a bit heavy and not performant. Having a way to translate name to fh, or open file by fh would be great : it would make it possible to get rid of all this heavy plumber we did with the db. In fact, half of the work is already done in my project : we use LUSTRE a lot on our site, and we had a need for exporting LUSTRE via NFS. There is a user space LUSTRE-API was provide this "name to fid" and "open by fid" feature. We used it to build a LUSTRE dedicated backend, and this fit perfectly our needs. So, if patches are made to perform name-to-handle and open-by-handle operation, this would be great. Of course, this is my personal point of view, but personally I have a clear need of this feature. Regards Philippe