RE: [PATCH] Allow cluster-wide flock

From: Trond Myklebust
Date: Mon Aug 30 2004 - 18:07:52 EST


I missed Ken's original mail this morning, so apologies for breaking the
thread...

So I have 2 comments:

Firstly, it would be nice to throw out the existing wait loop in
sys_flock(), and replace it with a call to this new
flock_lock_file_wait(). I suppose that can be done in a separate cleanup
patch, though...


More importantly, though, I'm concerned that the overloading of
f_op->lock() may break behaviour on NFS and CIFS.
NFS currently has a test in nfs_lock() that causes it to return -ENOLCK
if the argument is not a posix lock. I'm planning on changing that by
implementing a proper flock(), but we need an interim solution that
doesn't change existing behaviour for people.

Any comment on the effects on CIFS, Steven?


One solution that I've already suggested to Ken & co is to use a
separate f_op->flock() call. That would be my preference, since the
filesystems have to treat flock and posix locks differently anyway.

Alternatively, we're going to have to fix up NFS at least (CIFS?) before
this patch can be applied to the mainline kernel.

Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/