From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Robert Rappaport" Subject: Re: File system awareness (or lack thereof) of vfs granting of leases Date: Tue, 20 Feb 2007 10:46:51 -0500 Message-ID: References: <45D6937A.10902@redhat.com> <20070218063948.GC22022@fieldses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Wendy Cheng" , linux-fsdevel@vger.kernel.org To: "J. Bruce Fields" Return-path: Received: from ug-out-1314.google.com ([66.249.92.171]:56534 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965096AbXBTPqx (ORCPT ); Tue, 20 Feb 2007 10:46:53 -0500 Received: by ug-out-1314.google.com with SMTP id 44so818638uga for ; Tue, 20 Feb 2007 07:46:52 -0800 (PST) In-Reply-To: <20070218063948.GC22022@fieldses.org> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 2/18/07, J. Bruce Fields wrote: > On Sat, Feb 17, 2007 at 12:32:42AM -0500, Wendy Cheng wrote: > > Robert Rappaport wrote: > > > > >[snip] > > >.... This is because the vfs running on the same node where the > > >samba server is running is not necessarily aware of all accesses to > > >the file on which it is granting a lease. Since vfs does not > > >currently inform file systems about the granting and rescinding of > > >leases, a clustered file system cannot allow a samba server to support > > >OpLocks on its files and this has a negative impact on performance. > > > > > >What I think is needed is to add a file systems defined > > >file_operations function, that would be invoked when vfs is > > >considering the granting of a lease on a file associated with an > > >inode. Such an enhancement would allow a file system to be come aware > > >of vfs lease activity and allow it to support this activity. > > > > > NFS has similar issues because Linux NLM-VFS does not invoke server side > > filesystem specific lock method. This implies NFS client applications is > > not able to use posix locks to coordinate file access across different > > nodes with a cluster filesystem, even the cluster filesystem itself > > does support posix locking. > > We also have the same problem with leases, since we're using leases to > implement NFSv4 delegations. There's a simple-minded patch here: > > http://linux-nfs.org/cgi-bin/gitweb.cgi?p=bfields-2.6.git;a=commitdiff;h=4e8aff5dabe07b2e4e95ef0c741a34f65409087f > > I'm not really sure if it's right. > > --b. > Thank you both for your helpful replies. In particular, the addition of the calls to file system specific functions in routines, fcntl_setlease() and break_lease(), as well as the modifications to the file_operations and inode_operations structures, pointed to by Bruce's reply, look exactly like the hooks that I would need to proceed to resolve my problems. Is there any timetable established for these modifications to make it into a future release? These hooks would clearly benefit any cluster file system that has to deal with leases. - Robert Rappaport