From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Aneesh Kumar K. V" Subject: Re: [PATCH -V4 2/6] vfs: Add name to file handle conversion support Date: Mon, 26 Apr 2010 15:44:41 +0530 Message-ID: <874oiyplke.fsf@linux.vnet.ibm.com> References: <1272022715-11716-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1272022715-11716-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <6EE769C5-7307-49FF-BA8B-8C19EF04373E@sun.com> <20100426095208.GA23020@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: hch@infradead.org, viro@zeniv.linux.org.uk, corbet@lwn.net, serue@us.ibm.com, linux-fsdevel@vger.kernel.org, sfrench@us.ibm.com To: Christoph Hellwig , Andreas Dilger Return-path: Received: from e28smtp09.in.ibm.com ([122.248.162.9]:60495 "EHLO e28smtp09.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754040Ab0DZKOp (ORCPT ); Mon, 26 Apr 2010 06:14:45 -0400 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by e28smtp09.in.ibm.com (8.14.3/8.13.1) with ESMTP id o3Q9Mjl1013031 for ; Mon, 26 Apr 2010 14:52:45 +0530 Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o3QAEhHR2900148 for ; Mon, 26 Apr 2010 15:44:43 +0530 Received: from d28av04.in.ibm.com (loopback [127.0.0.1]) by d28av04.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o3QAEgi6025418 for ; Mon, 26 Apr 2010 20:14:43 +1000 In-Reply-To: <20100426095208.GA23020@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, 26 Apr 2010 05:52:08 -0400, Christoph Hellwig wrote: > On Fri, Apr 23, 2010 at 04:02:14PM -0600, Andreas Dilger wrote: > > Out of curiosity, why not do this for other types of files? It makes sense from a consistency POV, so that the userspace code doesn't have to special-case each file by checking the type first (which would mean doing an extra path traversal and stat for each file first, adding overhead). > > This limitation seems to be copied from the original XFS handle code, > but I don't see any good reason to stay with it. > The limitation came from the original XFS handle code. So to support symlink and regular files better i added the below syscalls to the patch set. sys_name_to_handle, sys_lname_to_handle and sys_freadlink. The last to return the link target name from an fd. This enables to use handle for symlink and then use the fd returned from open_by_handle to get the target name. Let me know what you think -aneesh