lkml.org 
[lkml]   [2004]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] Patch to allow distributed flock
From
Date
På to , 24/06/2004 klokka 19:10, skreiv Ken Preslan:
> Hi,
>
> I'd like to start a discussion about changing the VFS so it allows
> flocks to be enforced between machines in a cluster filesystem (such as
> GFS). The purpose of GFS it so allow local filesystem semantics
> to a filesystem shared between the nodes of a cluster of tightly-coupled
> machines. As such, flock is probably expected to work across the cluster.
>
> What are everyone's thoughts on a patch such as this?

If you defer updating the VFS until after the ->lock() call returns,
then it makes it difficult to protect yourself against races (as I
argued about the POSIX lock interface on the list yesterday).

If you have the underlying filesystem call flock_lock_file() itself,
then that gives it the freedom to implement its own locking scheme
around that call.
For instance NFS has a thread that is supposed to reclaim locks if the
server reboots. We take a non-exclusive lock on an rwsem to ensure that
we block it while there are outstanding locking RPC calls, however that
rwsem has to be released before we return from the ->lock() call, and so
there exists a race after the rwsem was released until the
inode->i_flock list is updated.

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

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.064 / U:23.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site