Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-07 Thread Robert Rappaport
My interpretation of the preceeding is that there is agreement that the functionality currently implemented in __setlease() should be exported, even though the exported name may not be __setlease(). Is this correct? If so, that is just fine with me. The question that I have now is when do you

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-07 Thread J. Bruce Fields
On Thu, Jun 07, 2007 at 10:43:51AM -0400, Robert Rappaport wrote: My interpretation of the preceeding is that there is agreement that the functionality currently implemented in __setlease() should be exported, even though the exported name may not be __setlease(). Is this correct? Yes. If

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-05 Thread Trond Myklebust
Why isn't the existing setlease() export sufficient? The plan is to more or less get rid of __setlease(). Trond On Tue, 2007-06-05 at 18:04 -0400, Robert Rappaport wrote: I have had some previous communications with Bruce on these topics, and I am generally pleased with the proposed

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-05 Thread Marc Eshel
Hi Bruce, The file system does need to keep the local state up to date, like it does with posix locks, so it might need to call __setlease(). The why we had it before was that the call to the file system was done from outside of setlease() and the file system was able to call setlease() which

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-05 Thread Trond Myklebust
On Tue, 2007-06-05 at 15:56 -0700, Marc Eshel wrote: Hi Bruce, The file system does need to keep the local state up to date, like it does with posix locks, so it might need to call __setlease(). The why we had it before was that the call to the file system was done from outside of

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-04 Thread J. Bruce Fields
On Sat, Jun 02, 2007 at 02:21:22PM -0400, Trond Myklebust wrote: Currently, the lease handling is done all in the VFS, and is done prior to calling any filesystem operations. Bruce's break_lease() inode operation allows the VFS to notify the filesystem that some operation is going to be called

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-02 Thread Marc Eshel
[EMAIL PROTECTED] wrote on 06/02/2007 10:39:10 AM: On Fri, 2007-06-01 at 12:53 -0400, J. Bruce Fields wrote: It also means that you're calling twice down into the filesystem for every call to may_open() (once for vfs_permission() and once for break_lease()) and 3 times in

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-02 Thread Trond Myklebust
On Sat, 2007-06-02 at 11:09 -0700, Marc Eshel wrote: A cluster filesystem don't need the inode operation breake_lease. The fs must be able to detect the conflict and break the lease using __break_lease() call on all the nodes that hold a conflicting leases. Marc. Currently, the lease

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-02 Thread Trond Myklebust
On Sat, 2007-06-02 at 11:09 -0700, Marc Eshel wrote: [EMAIL PROTECTED] wrote on 06/02/2007 10:39:10 AM: ^ BTW: your mailer is seriously broken. Trond - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-01 Thread J. Bruce Fields
On Fri, Jun 01, 2007 at 09:14:53AM -0400, Peter Staubach wrote: J. Bruce Fields wrote: From: J. Bruce Fields [EMAIL PROTECTED] Currently leases are only kept locally, so there's no way for a distributed filesystem to enforce them against multiple clients. We're particularly interested in

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-01 Thread J. Bruce Fields
On Thu, May 31, 2007 at 06:34:09PM -0400, Trond Myklebust wrote: On Thu, 2007-05-31 at 17:40 -0400, J. Bruce Fields wrote: diff --git a/include/linux/fs.h b/include/linux/fs.h index 7cf0c54..09aefb4 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1112,6 +1112,7 @@ struct

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-01 Thread Matthew Wilcox
On Fri, Jun 01, 2007 at 12:44:16PM -0400, J. Bruce Fields wrote: The only problem I'm aware of is that leases aren't broken on rename, link, and unlink. This is kind of tricky to fix. David Richter (cc'd) and I sketched out a few different approaches, and I think he has some patches

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-06-01 Thread J. Bruce Fields
On Fri, Jun 01, 2007 at 11:41:23AM -0600, Matthew Wilcox wrote: Samba internally prohibits renaming or deleting an open file, to match Windows semantics. So it won't notice the difference. At least, that's what I remember from a discussion with Tridge when we were implementing leases back in

Re: [NFS] [PATCH] locks: provide a file lease method enabling cluster-coherent leases

2007-05-31 Thread Trond Myklebust
On Thu, 2007-05-31 at 17:40 -0400, J. Bruce Fields wrote: From: J. Bruce Fields [EMAIL PROTECTED] Currently leases are only kept locally, so there's no way for a distributed filesystem to enforce them against multiple clients. We're particularly interested in the case of nfsd exporting a