From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Aneesh Kumar K. V" Subject: Re: [RFC PATCH] Generic name to handle and open by handle syscalls Date: Mon, 22 Feb 2010 11:57:37 +0530 Message-ID: <87sk8tn5t2.fsf@linux.vnet.ibm.com> References: <1266558149-11460-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <74B8CBFE-B15E-4677-8C83-522AB1524EDA@sun.com> <87zl35imgs.fsf@linux.vnet.ibm.com> <89DF2D17-9222-4768-9944-1477F1648B8F@sun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: hch@infradead.org, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org To: Andreas Dilger Return-path: Received: from e28smtp06.in.ibm.com ([122.248.162.6]:33814 "EHLO e28smtp06.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739Ab0BVG1n (ORCPT ); Mon, 22 Feb 2010 01:27:43 -0500 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by e28smtp06.in.ibm.com (8.14.3/8.13.1) with ESMTP id o1M6RdaO026642 for ; Mon, 22 Feb 2010 11:57:39 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o1M6RdSB3088518 for ; Mon, 22 Feb 2010 11:57:39 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o1M6RcwL017722 for ; Mon, 22 Feb 2010 17:27:38 +1100 In-Reply-To: <89DF2D17-9222-4768-9944-1477F1648B8F@sun.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, 20 Feb 2010 12:01:38 -0700, Andreas Dilger wrote: > On 2010-02-19, at 02:49, Aneesh Kumar K. V wrote: > > On Fri, 19 Feb 2010 02:34:29 -0700, Andreas Dilger > > wrote: > >> > >> What is the expected lifespan of "fh" to remain valid in the kernel? > >> Presumably this is not just the encoding of the inode number into a > >> buffer, or it would be too easy to forge from userspace. That means > >> there needs to be some unguessable state in the kernel for each file > >> handle, that may potentially need to be kept indefinitely if there is > >> no expiry. > >> > >> Will "fh" be portable between processes? I assume that is the > >> intent, > >> but good to declare the actual semantics of the syscalls before they > >> go into the kernel. > > > > Life time rule and uniqueness rule should be same as the NFS file > > handle. My understanding is there is no expiry. > > Yes, and NFS file handles can be a pain in the ass, because it means > inode numbers/devices/fsid should never be changed for fear of > breaking NFS. I'd much rather advertise that handles have a limited > lifespan (e.g. at most until the server reboots, possibly sooner) so > that there isn't an expectation of them lasting forever. That will make the interface not useful for applications like user space NFS server right ? Most of them want server to map the handle to an inode even after a server crash right. The crash recovery might be done in case of these network file system with the above assumptions. -aneesh