Re: i_version changes

2008-02-12 Thread J. Bruce Fields
On Sun, Feb 10, 2008 at 08:30:41AM +0100, Christoph Hellwig wrote: I think the i_version changes that hit mainline about a week ago are not as nice as they should be. First there's a complete lack of documentation on this, which is very bad. Please document what the new semantics for

Re: NFS client hang on attempt to do async blocking posix lock enqueue

2008-02-08 Thread J. Bruce Fields
On Fri, Feb 08, 2008 at 03:54:14PM -0500, Jeff Layton wrote: Interesting. It's not clear me why the underlying filesystem would make any difference there. Though now that I look, it looks like fl_grant really only gets called from dlm code, and that queues up the block for an immediate grant

Re: NFS client hang on attempt to do async blocking posix lock enqueue

2008-02-08 Thread J. Bruce Fields
On Fri, Feb 08, 2008 at 07:15:02AM -0500, Jeff Layton wrote: On Thu, 7 Feb 2008 18:26:18 -0500 J. Bruce Fields [EMAIL PROTECTED] wrote: On Sun, Jan 20, 2008 at 09:58:59AM -0500, Oleg Drokin wrote: Hello! On Jan 18, 2008, at 6:07 PM, J. Bruce Fields wrote: On Thu, Nov 29, 2007

Re: NFS client hang on attempt to do async blocking posix lock enqueue

2008-02-07 Thread J. Bruce Fields
On Sun, Jan 20, 2008 at 09:58:59AM -0500, Oleg Drokin wrote: Hello! On Jan 18, 2008, at 6:07 PM, J. Bruce Fields wrote: On Thu, Nov 29, 2007 at 02:41:57PM -0800, Marc Eshel wrote: The problem seems to be with the fact that the client and server are on the same machine. This test work fine

file locking patches

2008-02-03 Thread J. Bruce Fields
The following changes are available from the locks branch of the git repository at: git://linux-nfs.org/~bfields/linux.git locks These are just three small file-locking-related patches, mostly cleanup. All of them have been unchanged in -mm for a while. --b. J. Bruce Fields (1): locks

Re: [PATCH 0/3] enhanced ESTALE error handling

2008-01-18 Thread J. Bruce Fields
On Fri, Jan 18, 2008 at 10:35:50AM -0500, Peter Staubach wrote: Hi. Here is a patch set which modifies the system to enhance the ESTALE error handling for system calls which take pathnames as arguments. I think your cover letter may be bigger than any of the actual patches I'm not

Re: [PATCH 1/3] enhanced ESTALE error handling

2008-01-18 Thread J. Bruce Fields
On Fri, Jan 18, 2008 at 11:45:52AM -0500, Peter Staubach wrote: Matthew Wilcox wrote: On Fri, Jan 18, 2008 at 10:36:01AM -0500, Peter Staubach wrote: static int path_lookup_create(int dfd, const char *name, - unsigned int lookup_flags, struct nameidata *nd, -

Re: NFS client hang on attempt to do async blocking posix lock enqueue

2008-01-18 Thread J. Bruce Fields
you said the server is trying to send the grant message to the client but for some reason it fails when the client is on the same machine. That *shouldn't* make a difference, so we need to take another look at this--Oleg, this problem is still unfixed, right? --b. Marc. J. Bruce Fields

Re: [PATCH 0/3] enhanced ESTALE error handling

2008-01-18 Thread J. Bruce Fields
On Fri, Jan 18, 2008 at 01:12:03PM -0500, Peter Staubach wrote: Chuck Lever wrote: On Jan 18, 2008, at 12:30 PM, Peter Staubach wrote: I can probably imagine a situation where the pathname resolution would never finish, but I am not sure that it could ever happen in nature. Unless someone

Re: Leak in nlmsvc_testlock for async GETFL case

2008-01-15 Thread J. Bruce Fields
On Mon, Jan 14, 2008 at 09:26:06PM -0700, Matthew Wilcox wrote: On Mon, Jan 14, 2008 at 03:44:19PM -0500, J. Bruce Fields wrote: Thanks! I've queued it up for 2.6.25. Hi Bruce, I haven't had as much time to play with de-BKL-ising fs/locks.c as I would like, so fixing that for 2.6.25

Re: file locks: Use wait_event_interruptible_timeout()

2008-01-15 Thread J. Bruce Fields
On Mon, Jan 14, 2008 at 09:28:30PM -0700, Matthew Wilcox wrote: interruptible_sleep_on_locked() is just an open-coded wait_event_interruptible_timeout() with a few assumptions since we know we hold the BKL. locks_block_on_timeout() is only used in one place, so it's actually simpler to

Re: file locks: Split flock_find_conflict out of flock_lock_file

2008-01-15 Thread J. Bruce Fields
On Mon, Jan 14, 2008 at 09:29:39PM -0700, Matthew Wilcox wrote: Reduce the spaghetti-like nature of flock_lock_file by making the chunk of code labelled find_conflict into its own function. Also allocate memory before taking the kernel lock in preparation for switching to a normal spinlock.

Re: file locks: Use wait_event_interruptible_timeout()

2008-01-15 Thread J. Bruce Fields
On Tue, Jan 15, 2008 at 08:04:47AM -0700, Matthew Wilcox wrote: On Tue, Jan 15, 2008 at 09:48:51AM -0500, J. Bruce Fields wrote: On Mon, Jan 14, 2008 at 09:28:30PM -0700, Matthew Wilcox wrote: interruptible_sleep_on_locked() is just an open-coded wait_event_interruptible_timeout

Re: Leak in nlmsvc_testlock for async GETFL case

2008-01-14 Thread J. Bruce Fields
On Fri, Jan 11, 2008 at 09:57:35PM -0500, Oleg Drokin wrote: Hello! On Nov 29, 2007, at 2:08 PM, J. Bruce Fields wrote: On Thu, Nov 29, 2007 at 01:46:04PM -0500, Oleg Drokin wrote: Hello! Per our discussion, I am resending this patch that fixes a leak in nlmsvc_testlock

Re: On setting a lease across a cluster

2008-01-04 Thread J. Bruce Fields
On Fri, Jan 04, 2008 at 01:55:36PM -0500, david m. richter wrote: On Fri, 4 Jan 2008, Matthew Wilcox wrote: Hi Bruce, The current implementation of vfs_setlease/generic_setlease/etc is a bit quirky. I've been thinking it over for the past couple of days, and I think we need to

Re: On setting a lease across a cluster

2008-01-04 Thread J. Bruce Fields
On Fri, Jan 04, 2008 at 01:35:50PM -0700, Matthew Wilcox wrote: vfs_setlease() if (f_op-setlease()) res = f_op-setlease() if (res) return res; lock_kernel() generic_setlease() unlock_kernel() Why can't the filesystem call into

Re: On setting a lease across a cluster

2008-01-04 Thread J. Bruce Fields
On Fri, Jan 04, 2008 at 02:08:18PM -0700, Matthew Wilcox wrote: On Fri, Jan 04, 2008 at 03:53:04PM -0500, J. Bruce Fields wrote: So, the problem is that fcntl_setlease() does vfs_setlease() fasync_helper() which the bkl held over both, and you want to preserve

Re: [RFC] Remove BKL from fs/locks.c

2008-01-04 Thread J. Bruce Fields
On Sat, Dec 29, 2007 at 11:16:15PM -0700, Matthew Wilcox wrote: I've been promising to do this for about seven years now. It seems to work well enough, but I haven't run any serious stress tests on it. This implementation uses one spinlock to protect both lock lists and all the i_flock

Re: [RFC][PATCH] Pid namespaces vs locks interaction

2007-12-06 Thread J. Bruce Fields
On Thu, Dec 06, 2007 at 03:57:29PM +0300, Vitaliy Gusev wrote: I am working on pid namespaces vs locks interaction and want to evaluate the idea. fcntl(F_GETLK,..) can return pid of process for not current pid namespace (if process is belonged to the several namespaces). It is true also for

Re: Leak in nlmsvc_testlock for async GETFL case

2007-11-29 Thread J. Bruce Fields
On Thu, Nov 29, 2007 at 01:46:04PM -0500, Oleg Drokin wrote: Hello! Per our discussion, I am resending this patch that fixes a leak in nlmsvc_testlock. It is addition to another leak fixing patch you already have. Without the patch, there is a leakage of nlmblock structure

NFS client hang on attempt to do async blocking posix lock enqueue

2007-11-29 Thread J. Bruce Fields
On Thu, Nov 29, 2007 at 02:04:40PM -0500, Oleg Drokin wrote: Hello! There is a problem with blocking async posix lock enqueue in 2.6.22 and 2.6.23 kernels. Lock call to underlying FS is done just fine, but when fl_grant is called to inform lockd of succesful granting,

Re: Beagle and logging inotify events

2007-11-15 Thread J. Bruce Fields
On Thu, Nov 15, 2007 at 08:59:46PM +0100, Jan Kara wrote: BTW: Where did this discussion started? Googling the subject gives me just one news message... Here: http://marc.info/?l=linux-fsdevelm=119499881822672w=2 and before that, here:

Re: Beagle and logging inotify events

2007-11-14 Thread J. Bruce Fields
On Wed, Nov 14, 2007 at 02:22:51PM -0500, Jon Smirl wrote: On 11/14/07, J. Bruce Fields [EMAIL PROTECTED] wrote: On Wed, Nov 14, 2007 at 04:30:16PM +0100, Andi Kleen wrote: Jon Smirl [EMAIL PROTECTED] writes: On 11/14/07, Chuck Lever [EMAIL PROTECTED] wrote: On Nov 13, 2007, at 7

Re: Beagle and logging inotify events

2007-11-14 Thread J. Bruce Fields
On Wed, Nov 14, 2007 at 04:30:16PM +0100, Andi Kleen wrote: Jon Smirl [EMAIL PROTECTED] writes: On 11/14/07, Chuck Lever [EMAIL PROTECTED] wrote: On Nov 13, 2007, at 7:04 PM, Jon Smirl wrote: Is it feasible to do something like this in the linux file system architecture? Beagle

[PATCH, RESEND] locks: fix possible infinite loop in posix deadlock detection

2007-10-30 Thread J. Bruce Fields
From: J. Bruce Fields [EMAIL PROTECTED] It's currently possible to send posix_locks_deadlock() into an infinite loop (under the BKL). For now, fix this just by bailing out after a few iterations. We may want to fix this in a way that better clarifies the semantics of deadlock detection

Re: [RFC, PATCH] locks: remove posix deadlock detection

2007-10-30 Thread J. Bruce Fields
On Mon, Oct 29, 2007 at 08:06:04AM +, Alan Cox wrote: On Sun, 28 Oct 2007 13:43:21 -0400 J. Bruce Fields [EMAIL PROTECTED] wrote: From: J. Bruce Fields [EMAIL PROTECTED] We currently attempt to return -EDEALK to blocking fcntl() file locking requests that would create a cycle

[PATCH] locks: fix possible infinite loop in posix deadlock detection

2007-10-28 Thread J. Bruce Fields
From: J. Bruce Fields [EMAIL PROTECTED] I think the real solution is to remove deadlock detection completely; it's hard to imaagine applications really depend on it anyway. For now, though, just bail out after a few iterations. Thanks to George Davis for reporting the problem. Cc: George G

[RFC, PATCH] locks: remove posix deadlock detection

2007-10-28 Thread J. Bruce Fields
From: J. Bruce Fields [EMAIL PROTECTED] We currently attempt to return -EDEALK to blocking fcntl() file locking requests that would create a cycle in the graph of tasks waiting on locks. This is inefficient: in the general case it requires us determining whether we're adding a cycle

Re: [RFC, PATCH] locks: remove posix deadlock detection

2007-10-28 Thread J. Bruce Fields
On Sun, Oct 28, 2007 at 06:40:52PM +, Alan Cox wrote: On Sun, 28 Oct 2007 12:27:32 -0600 Matthew Wilcox [EMAIL PROTECTED] wrote: On Sun, Oct 28, 2007 at 01:43:21PM -0400, J. Bruce Fields wrote: We currently attempt to return -EDEALK to blocking fcntl() file locking requests

Re: [RFC, PATCH] locks: remove posix deadlock detection

2007-10-28 Thread J. Bruce Fields
On Sun, Oct 28, 2007 at 04:41:57PM -0600, Matthew Wilcox wrote: On Sun, Oct 28, 2007 at 05:50:30PM -0400, Trond Myklebust wrote: You can't fix the false EDEADLK detection without solving the halting problem. Best of luck with that. I can see that it would be difficult to do

Re: [RFC, PATCH] locks: remove posix deadlock detection

2007-10-28 Thread J. Bruce Fields
On Sun, Oct 28, 2007 at 11:38:26PM +, Alan Cox wrote: The spec and SYSV certainly ignore threading in this situation and you know that perfectly well (or did in 2004) The discussion petered out (or that mailing list archive lost articles from the thread) without any kind of

Re: [NFS] [PATCH] exportfs: fix doc types

2007-09-14 Thread J. Bruce Fields
On Fri, Sep 14, 2007 at 06:03:01PM +0200, Christoph Hellwig wrote: And here's a patch to fix the typos Greg found: Thanks. I already had a couple of those in a separate patch, so I've folded this in. --b. - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a

Re: [NFS] [PATCH 00/19] export operations rewrite

2007-09-14 Thread J. Bruce Fields
On Fri, Sep 14, 2007 at 01:47:46PM +0200, [EMAIL PROTECTED] wrote: This patchset is a medium scale rewrite of the export operations interface. The goal is to make the interface less complex, and easier to understand from the filesystem side, aswell as preparing generic support for exporting

Re: [NFS] [PATCH 00/19] export operations rewrite

2007-09-14 Thread J. Bruce Fields
On Fri, Sep 14, 2007 at 07:00:25PM +0200, Christoph Hellwig wrote: On Fri, Sep 14, 2007 at 12:43:55PM -0400, J. Bruce Fields wrote: I'm hoping Neil can take a quick look as well (and make a response to the comment on patch #1 along the way). The exportfs_d_alloc one? I have a patch

Re: [2/4] 2.6.23-rc6: known regressions

2007-09-14 Thread J. Bruce Fields
On Wed, Sep 12, 2007 at 06:58:54PM +0200, Michal Piotrowski wrote: Subject : [NFSv4] 2.6.23-rc4 oops in nfs4_cb_recall References : http://lkml.org/lkml/2007/9/4/53 http://bugzilla.kernel.org/show_bug.cgi?id=9003 Last known good : ? Submitter : Daniel J

Re: Distributed storage. Move away from char device ioctls.

2007-09-14 Thread J. Bruce Fields
On Fri, Sep 14, 2007 at 05:14:53PM -0400, Jeff Garzik wrote: J. Bruce Fields wrote: On Fri, Sep 14, 2007 at 03:07:46PM -0400, Jeff Garzik wrote: I've been waiting for years for a smart person to come along and write a POSIX-only distributed filesystem. What exactly do you mean by POSIX-only

Re: Distributed storage. Move away from char device ioctls.

2007-09-14 Thread J. Bruce Fields
On Fri, Sep 14, 2007 at 03:07:46PM -0400, Jeff Garzik wrote: My thoughts. But first a disclaimer: Perhaps you will recall me as one of the people who really reads all your patches, and examines your code and proposals closely. So, with that in mind... I question the value of distributed

Re: Distributed storage. Move away from char device ioctls.

2007-09-14 Thread J. Bruce Fields
On Fri, Sep 14, 2007 at 06:32:11PM -0400, Jeff Garzik wrote: J. Bruce Fields wrote: On Fri, Sep 14, 2007 at 05:14:53PM -0400, Jeff Garzik wrote: J. Bruce Fields wrote: On Fri, Sep 14, 2007 at 03:07:46PM -0400, Jeff Garzik wrote: I've been waiting for years for a smart person to come along

Re: Distributed storage. Move away from char device ioctls.

2007-09-14 Thread J. Bruce Fields
On Sat, Sep 15, 2007 at 12:08:42AM -0400, Jeff Garzik wrote: J. Bruce Fields wrote: No, servers are required to support ordinary nfs operations to the metadata server. At least, that's the way it was last I heard, which was a while ago. I agree that it'd stink (for any number of reasons

Re: [NFS] [PATH 08/19] jfs: new export ops

2007-09-13 Thread J. Bruce Fields
On Thu, Sep 13, 2007 at 03:59:34PM +0200, Christoph Hellwig wrote: Yes, please add them to the queue. I've put a quilt series of patches with the whitespace fixe on http://verein.lst.de/~hch/patches.nfsd.tgz. Do you want to take it that way or should I resend everything to the list? Yeah, I

Re: [NFS] [PATH 08/19] jfs: new export ops

2007-09-10 Thread J. Bruce Fields
On Thu, Aug 30, 2007 at 03:16:32PM +0200, Christoph Hellwig wrote: Trivial switch over to the new generic helpers. - result = ERR_PTR(-ESTALE); - goto out_iput; + iput(inode); + return ERR_PTR(-ESTALE); For some reason you're introducing a

Re: [PATCH] rename setleast to generic_setlease

2007-07-20 Thread J. Bruce Fields
On Fri, Jul 20, 2007 at 11:28:23AM +0200, Christoph Hellwig wrote: Make it a little more clear that this is the default implemenation for the setleast operation. Yeah, I guess that is more consistent with the rest of the vfs. Thanks.--b. Signed-off-by: Christoph Hellwig [EMAIL PROTECTED]

Re: lease and lock patches

2007-07-18 Thread J. Bruce Fields
Would it still be possible to merge this for 2.6.23? They've been through linux-fsdevel, Christoph has taken a pass through them, and I don't know of any unaddressed problems. --b. On Fri, Jul 13, 2007 at 07:34:57PM -0400, J. Bruce Fields wrote: Please pull from the 'for-linus' branch

Re: mount options for selectively disabling parts of CIFS Unix Extensions

2007-07-17 Thread J. Bruce Fields
On Mon, Jul 16, 2007 at 05:40:46PM -0500, Steve French wrote: I have seen various requests from users to disable part of the CIFS Unix Extensions on mount (in some cases fall back to the more primitive Windows behavior) but am wondering how far down this line of thought I should go ... Why do

[PATCH] VFS: fix a race in lease-breaking during truncate

2007-07-14 Thread J. Bruce Fields
() and get_write_access() calls prevents this race. Signed-off-by: David M. Richter [EMAIL PROTECTED] Signed-off-by: J. Bruce Fields [EMAIL PROTECTED] --- fs/open.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) I posted this patch to linux-fsdevel last week and nobody said

lease and lock patches

2007-07-13 Thread J. Bruce Fields
to give out delegations on cluster filesystems. For now, though, we're using this just to disallow leases selectively on certain filesystems (nfs and gfs2 for now) where they don't make sense. Also includes some minor locks.c cleanup. J. Bruce Fields (9): locks: convert an -EINVAL return

Re: [EXT4 set 4][PATCH 1/5] i_version:64 bit inode version

2007-07-11 Thread J. Bruce Fields
On Wed, Jul 11, 2007 at 01:21:55PM +1000, Neil Brown wrote: And just by-the-way, the server doesn't really have the option of not sending the attribute. If i_version isn't defined, it has to fake something using mtime, and hope that is good enough. ctime, actually--the change attribute is

Re: [EXT4 set 4][PATCH 1/5] i_version:64 bit inode version

2007-07-11 Thread J. Bruce Fields
On Wed, Jul 11, 2007 at 09:28:06AM -0500, Dave Kleikamp wrote: On Wed, 2007-07-11 at 15:05 +1000, Neil Brown wrote: It just occurred to me: If i_version is 64bit, then knfsd would need to be careful when reading it on a 32bit host. What are the locking rules? How does knfsd use

Re: [PATCH 6/6] nfs: disable leases over NFS

2007-07-11 Thread J. Bruce Fields
On Wed, Jul 11, 2007 at 11:20:18AM +0100, Christoph Hellwig wrote: On Thu, Jul 05, 2007 at 11:41:00AM -0400, J. Bruce Fields wrote: OK, after looking at this a little more, I'm less happy about the idea of erroring out by default: - There are a ton of filesystems that probably should

Re: [EXT4 set 4][PATCH 1/5] i_version:64 bit inode version

2007-07-06 Thread J. Bruce Fields
On Tue, Jul 03, 2007 at 05:32:00PM -0600, Andreas Dilger wrote: On Jul 03, 2007 18:15 -0400, J. Bruce Fields wrote: How will nfsd tell whether it can really on a given filesystem's i_version, or whether it should fall back on ctime? Good question. Well, we don't need anything

[PATCH] VFS: fix a race in lease-breaking during truncate

2007-07-06 Thread J. Bruce Fields
() and get_write_access() calls prevents this race. Signed-off-by: David M. Richter [EMAIL PROTECTED] Signed-off-by: J. Bruce Fields [EMAIL PROTECTED] --- fs/open.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/fs/open.c b/fs/open.c index 0d515d1..c32aba0 100644

Re: [PATCH 6/6] nfs: disable leases over NFS

2007-07-05 Thread J. Bruce Fields
On Sat, Jun 30, 2007 at 10:25:16AM +0100, Christoph Hellwig wrote: On Fri, Jun 29, 2007 at 03:21:30PM -0400, J. Bruce Fields wrote: Define an nfs setlease method that just returns -EOPNOTSUPP. If someone can demonstrate a real need, perhaps we could reenable them in the presence

Re: [PATCH 3/6] locks: rename lease functions to reflect locks.c conventions

2007-07-04 Thread J. Bruce Fields
On Sat, Jun 30, 2007 at 10:22:43AM +0100, Christoph Hellwig wrote: On Fri, Jun 29, 2007 at 03:21:27PM -0400, J. Bruce Fields wrote: From: J. Bruce Fields [EMAIL PROTECTED] We've been using the convention that vfs_foo is the function that calls a filesystem-specific foo method

Re: [PATCH 4/6] locks: fix locks.c lease symbol exports

2007-07-04 Thread J. Bruce Fields
On Sat, Jun 30, 2007 at 10:23:45AM +0100, Christoph Hellwig wrote: On Fri, Jun 29, 2007 at 03:21:28PM -0400, J. Bruce Fields wrote: From: J. Bruce Fields [EMAIL PROTECTED] Bring lease exports into line with conventions for posix locks: setlease() should be exported so filesystems can

Re: [PATCH 5/6] gfs2: stop giving out non-cluster-coherent leases

2007-07-04 Thread J. Bruce Fields
On Sat, Jun 30, 2007 at 10:27:42AM +0100, Christoph Hellwig wrote: On Fri, Jun 29, 2007 at 03:21:29PM -0400, J. Bruce Fields wrote: +static int gfs2_setlease(struct file *file, long arg, struct file_lock **fl) +{ + struct gfs2_sbd *sdp = GFS2_SB(file-f_mapping-host); + int ret

Re: [PATCH 6/6] nfs: disable leases over NFS

2007-07-04 Thread J. Bruce Fields
On Sat, Jun 30, 2007 at 10:25:16AM +0100, Christoph Hellwig wrote: On Fri, Jun 29, 2007 at 03:21:30PM -0400, J. Bruce Fields wrote: From: J. Bruce Fields [EMAIL PROTECTED] As Peter Staubach says elsewhere (http://marc.info/?l=linux-kernelm=118113649526444w=2): The problem

Re: [EXT4 set 4][PATCH 2/5] i_version: Add hi 32 bit inode version on ext4 on-disk inode

2007-07-03 Thread J. Bruce Fields
On Sun, Jul 01, 2007 at 03:37:16AM -0400, Mingming Cao wrote: This patch adds a 32-bit i_version_hi field to ext4_inode, which can be used for 64-bit inode versions. This field will store the higher 32 bits of the version, while Jean Noel's patch has added support to store the lower 32-bits

Re: [EXT4 set 4][PATCH 1/5] i_version:64 bit inode version

2007-07-03 Thread J. Bruce Fields
On Mon, Jul 02, 2007 at 10:58:33AM -0400, Mingming Cao wrote: Trond or Bruce, can you please review these patch series and ack if you agrees? Thanks, looks like what we need! How will nfsd tell whether it can really on a given filesystem's i_version, or whether it should fall back on ctime?

Re: [PATCH 1/6] locks: share more common lease code

2007-07-03 Thread J. Bruce Fields
On Sat, Jun 30, 2007 at 10:20:13AM +0100, Christoph Hellwig wrote: On Fri, Jun 29, 2007 at 03:21:25PM -0400, J. Bruce Fields wrote: From: J. Bruce Fields [EMAIL PROTECTED] Share more code between setlease (used by nfsd) and fcntl. Also some minor cleanup. Looks good. Fine

Re: [PATCH 5/6] gfs2: stop giving out non-cluster-coherent leases

2007-07-01 Thread J. Bruce Fields
On Sat, Jun 30, 2007 at 10:27:42AM +0100, Christoph Hellwig wrote: On Fri, Jun 29, 2007 at 03:21:29PM -0400, J. Bruce Fields wrote: +static int gfs2_setlease(struct file *file, long arg, struct file_lock **fl) +{ + struct gfs2_sbd *sdp = GFS2_SB(file-f_mapping-host); + int ret

[PATCH 4/6] locks: fix locks.c lease symbol exports

2007-06-29 Thread J. Bruce Fields
From: J. Bruce Fields [EMAIL PROTECTED] Bring lease exports into line with conventions for posix locks: setlease() should be exported so filesystems can use it to implement their lease methods. vfs_setlease() need only be GPL-exported since only nfsd

vfs lease api

2007-06-29 Thread J. Bruce Fields
Eventually we want to be able to support NFSv4 delegations for cluster filesystem exports. We implement NFSv4 delegations using leases. So to make this work, we need leases to be passed down to the filesystem, so that a cluster filesystem can enforce leases correctly across all nodes. The

[PATCH 3/6] locks: rename lease functions to reflect locks.c conventions

2007-06-29 Thread J. Bruce Fields
From: J. Bruce Fields [EMAIL PROTECTED] We've been using the convention that vfs_foo is the function that calls a filesystem-specific foo method if it exists, or falls back on a generic method if it doesn't. So rename setlease to vfs_setlease, and __setlease to setlease. Keep setlease exported

[PATCH 5/6] gfs2: stop giving out non-cluster-coherent leases

2007-06-29 Thread J. Bruce Fields
case all locking is local anyway). Signed-off-by: Marc Eshel [EMAIL PROTECTED] Signed-off-by: J. Bruce Fields [EMAIL PROTECTED] Cc: Steven Whitehouse [EMAIL PROTECTED] --- fs/gfs2/ops_file.c | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/fs/gfs2

[PATCH 6/6] nfs: disable leases over NFS

2007-06-29 Thread J. Bruce Fields
From: J. Bruce Fields [EMAIL PROTECTED] As Peter Staubach says elsewhere (http://marc.info/?l=linux-kernelm=118113649526444w=2): The problem is that some file system such as NFSv2 and NFSv3 do not have sufficient support to be able to support leases correctly. In particular for these two file

[PATCH 2/6] locks: provide a file lease method enabling cluster-coherent leases

2007-06-29 Thread J. Bruce Fields
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 cluster filesystem, in which case nfsd needs cluster-coherent

Re: [PATCH 6/6] nfs: disable leases over NFS

2007-06-29 Thread J. Bruce Fields
On Fri, Jun 29, 2007 at 05:16:19PM -0400, Peter Staubach wrote: First, there is already some support to disable leases for NFS mounted file systems in -mm, I think. Oops, sorry; my fault for not checking -mm before sending Are you planning on removing it? I'd rather do that, yes. Any

Re: [PATCH 6/6] nfs: disable leases over NFS

2007-06-29 Thread J. Bruce Fields
On Fri, Jun 29, 2007 at 11:30:27PM +0100, Steven Whitehouse wrote: EINVAL is fine by me, just so long as its not EAGAIN then it gets my blessing :-) OK. I've changed the error return, in both the NFS and GFS2 cases, did some minor cleanup and commenting while I was at it, and pushed the

Re: Versioning file system

2007-06-18 Thread J. Bruce Fields
On Mon, Jun 18, 2007 at 04:30:33PM -0400, Theodore Tso wrote: Well, I just want to make sure people know that Samba isn't asking for it any more, and I don't know of any current requests outstanding from any of the userspace projects. So there's no one we need to ship off to the re-education

Re: [PATCH 3/5] locks: rename lease functions to reflect locks.c conventions

2007-06-11 Thread J. Bruce Fields
On Sat, Jun 09, 2007 at 09:56:29AM -0700, Marc Eshel wrote: We need to export vfs_lease so nfsd can call it. Oops, thanks for finding that--done.--b. --b. diff --git a/fs/locks.c b/fs/locks.c index 82ac90b..c2fd0a5 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1453,6 +1453,8 @@ int

Re: [PATCH 4/5] gfs2: stop giving out non-cluster-coherent leases

2007-06-11 Thread J. Bruce Fields
On Mon, Jun 11, 2007 at 10:38:18AM +0100, Steven Whitehouse wrote: Hi, On Sat, 2007-06-09 at 09:35 -0700, Marc Eshel wrote: This is the return code that setlease() currently returns when the lease can not be obtained. Although ENOTSUPP would be more accurately describing the error it

[PATCH 4/5] gfs2: stop giving out non-cluster-coherent leases

2007-06-08 Thread J. Bruce Fields
From: Marc Eshel [EMAIL PROTECTED] Since gfs2 can't prevent conflicting opens or leases on other nodes, we probably shouldn't allow it to give out leases at all. Put the newly defined lease operation into use in gfs2 by turning off lease, unless we're using the nolock' locking module (in which

[no subject]

2007-06-08 Thread J. Bruce Fields
J. Bruce Fields [EMAIL PROTECTED] wrote: OK, good. I'll revise and post a new series. (Do people prefer another mailbomb or a git url?) OK, I went for the former; if you'd rather get this out of git, you can git clone http://www.linux-nfs.org/~bfields/linux.git git checkout

[PATCH 3/5] locks: rename lease functions to reflect locks.c conventions

2007-06-08 Thread J. Bruce Fields
From: J. Bruce Fields [EMAIL PROTECTED] We've been using the convention that vfs_foo is the function that calls a filesystem-specific foo method if it exists, or falls back on a generic method if it doesn't. So rename setlease to vfs_setlease, and __setlease to setlease. Keep setlease exported

[PATCH 1/5] locks: share more common lease code

2007-06-08 Thread J. Bruce Fields
From: J. Bruce Fields [EMAIL PROTECTED] Share more code between setlease (used by nfsd) and fcntl. Also some minor cleanup. Signed-off-by: J. Bruce Fields [EMAIL PROTECTED] --- fs/locks.c | 30 ++ 1 files changed, 10 insertions(+), 20 deletions(-) diff --git a/fs

[PATCH 5/5] nfs: disable leases over NFS

2007-06-08 Thread J. Bruce Fields
From: J. Bruce Fields [EMAIL PROTECTED] As Peter Staubach says elsewhere (http://marc.info/?l=linux-kernelm=118113649526444w=2): The problem is that some file system such as NFSv2 and NFSv3 do not have sufficient support to be able to support leases correctly. In particular for these two file

[PATCH 2/5] locks: provide a file lease method enabling cluster-coherent leases

2007-06-08 Thread J. Bruce Fields
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 cluster filesystem, in which case nfsd needs cluster-coherent

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-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-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

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: share more common lease code

2007-06-01 Thread J. Bruce Fields
becomes a simple BKL-taking wrapper around __setlease(); is that what you were thinking of? --b. From 4ce02551ab16d2812299ac0ced43652f1af0deb1 Mon Sep 17 00:00:00 2001 From: J. Bruce Fields [EMAIL PROTECTED] Date: Thu, 31 May 2007 17:03:46 -0400 Subject: [PATCH] locks: share more common lease code

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

[PATCH] gfs2: stop giving out non-cluster-coherent leases

2007-05-31 Thread J. Bruce Fields
From: Marc Eshel [EMAIL PROTECTED] Since gfs2 can't prevent conflicting opens or leases on other nodes, we probably shouldn't allow it to give out leases at all. Put the newly defined lease operation into use in gfs2 by turning off lease, unless we're using the nolock' locking module (in which

[PATCH] locks: share more common lease code

2007-05-31 Thread J. Bruce Fields
From: J. Bruce Fields [EMAIL PROTECTED] Share more code between setlease (used by nfsd) and fcntl. Also some minor cleanup. Signed-off-by: J. Bruce Fields [EMAIL PROTECTED] --- fs/locks.c | 14 +++--- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/fs/locks.c b/fs

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

2007-05-31 Thread J. Bruce Fields
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 cluster filesystem, in which case nfsd needs cluster-coherent

Re: [PATCH] AFS: Implement file locking [try #2]

2007-05-30 Thread J. Bruce Fields
On Wed, May 30, 2007 at 09:35:32AM +0100, David Howells wrote: J. Bruce Fields [EMAIL PROTECTED] wrote: --without having tried to understand how they're actually used, these data structures (like the pending_locks and granted_locks lists) seem to duplicate stuff that's already kept in fs

Re: [PATCH] AFS: Implement file locking

2007-05-29 Thread J. Bruce Fields
On Tue, May 29, 2007 at 10:34:41AM +0100, David Howells wrote: I'll need to test the upgrade/downgrade case. I don't know whether the AFS server supports that. If it doesn't, I can emulate downgrade, but not upgrade - not unless I only ever ask it for exclusive locks. Lock upgrading is

Re: [PATCH] AFS: Implement file locking [try #2]

2007-05-29 Thread J. Bruce Fields
One more vague question I had while skimming the previous version-- On Tue, May 29, 2007 at 03:54:27PM +0100, David Howells wrote: +static void afs_grant_locks(struct afs_vnode *vnode, struct file_lock *fl) +{ + struct file_lock *p, *_p; + + list_move_tail(fl-fl_u.afs.link,

Re: [PATCH] AFS: Implement file locking

2007-05-27 Thread J. Bruce Fields
On Sun, May 27, 2007 at 09:51:10AM +0100, David Howells wrote: J. Bruce Fields [EMAIL PROTECTED] wrote: So if I request a write lock while holding a read lock, my request will be denied? At the moment, yes. Don't the POSIX and flock lock-handling routines in the kernel normally do

Re: [PATCH] AFS: Implement file locking

2007-05-25 Thread J. Bruce Fields
On Thu, May 24, 2007 at 05:55:54PM +0100, David Howells wrote: +/* + * initialise the lock manager thread if it isn't already running + */ +static int afs_init_lock_manager(void) +{ + if (!afs_lock_manager) { + afs_lock_manager = create_singlethread_workqueue(kafs_lockd); +

Re: + knfsd-exportfs-add-exportfsh-header-fix.patch added to -mm tree

2007-05-16 Thread J. Bruce Fields
On Wed, May 16, 2007 at 09:55:41AM -0500, Steven French wrote: Any ideas what are the minimum export operation(s) that cifs would need to add to export under nfsd? It was not clear to me after reading the Exporting document in Documentation directory. (some users had wanted to export

Re: + knfsd-exportfs-add-exportfsh-header-fix.patch added to -mm tree

2007-05-16 Thread J. Bruce Fields
On Wed, May 16, 2007 at 12:03:57PM -0500, Steven French wrote: I thought that until a few days ago, a sequence like the following (two nfs servers exporting the same clustered data) on client 1 lock range A through B of file1 (exported from nfs server 1) on client 2 lock range A through C

nfs locking for cluster filesystems

2007-05-07 Thread J. Bruce Fields
[EMAIL PROTECTED] Signed-off-by: J. Bruce Fields [EMAIL PROTECTED] Acked-by: Steven Whitehouse [EMAIL PROTECTED] commit 1a8322b2b02071b0c7ac37a28357b93e6362f13e Author: Marc Eshel [EMAIL PROTECTED] Date: Tue Nov 28 16:27:06 2006 -0500 lockd: add code to handle deferred lock requests

Re: nfs locking for cluster filesystems

2007-04-17 Thread J. Bruce Fields
On Tue, Apr 17, 2007 at 11:05:19AM -0700, Andrew Morton wrote: On Tue, 17 Apr 2007 13:55:33 -0400 J. Bruce Fields [EMAIL PROTECTED] wrote: I've got an updated series addressing Christoph's comments (except that it's still using FL_CANCEL instead of a -cancel() file method). I

Re: [PATCH 8/8] AFS: Add security support

2007-04-11 Thread J. Bruce Fields
On Wed, Apr 11, 2007 at 08:10:37PM +0100, David Howells wrote: Add security support to the AFS filesystem. Kerberos IV tickets are added as RxRPC keys are added to the session keyring with the klog program. open() and other VFS operations then find this ticket with request_key() and either

Re: [PATCH 8/17] locks: add fl_notify arguments for asynchronous lock return

2007-04-10 Thread J. Bruce Fields
On Mon, Apr 09, 2007 at 07:40:41PM +0100, Christoph Hellwig wrote: On Thu, Apr 05, 2007 at 07:40:58PM -0400, J. Bruce Fields wrote: We're using fl_notify to asynchronously return the result of a lock request. So we want fl_notify to be able to return a status and, if appropriate

Re: [PATCH 9/17] locks: add lock cancel command

2007-04-10 Thread J. Bruce Fields
On Mon, Apr 09, 2007 at 07:41:44PM +0100, Christoph Hellwig wrote: On Thu, Apr 05, 2007 at 07:40:59PM -0400, J. Bruce Fields wrote: We do this by adding a new fcntl lock command: FL_CANCELLK. Some day this might also be made available to userspace applications that could benefit from

Re: [PATCH 12/17] lockd: handle fl_notify callbacks

2007-04-10 Thread J. Bruce Fields
On Mon, Apr 09, 2007 at 07:43:52PM +0100, Christoph Hellwig wrote: On Thu, Apr 05, 2007 at 07:41:02PM -0400, J. Bruce Fields wrote: + if (block-b_fl) + kfree(block-b_fl); kfree(NULL) is fine. Whoops, thanks, will fix. +static void +nlmsvc_update_deferred_block(struct

Re: [PATCH 1/17] locks: trivial removal of unnecessary parentheses

2007-04-08 Thread J. Bruce Fields
On Fri, Apr 06, 2007 at 08:30:04PM +1000, Stephen Rothwell wrote: On Thu, 5 Apr 2007 19:40:51 -0400 J. Bruce Fields [EMAIL PROTECTED] wrote: From: J. Bruce Fields [EMAIL PROTECTED] - unquoted Remove some unnecessary parentheses. Please don't do this. It is unnecessary churn

  1   2   >